-
Notifications
You must be signed in to change notification settings - Fork 0
/
jmh.edn
115 lines (100 loc) · 6.27 KB
/
jmh.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{:benchmarks [{:name :java-api-style-string-gen-in-prop
:fn net.lfn3.undertaker.benchmarks/run-in-prop
:args [:param/times :state/java-style-string-gen]
:options {:ops-per-invocation 100}}
{:name :java-api-style-string-gen
:fn net.lfn3.undertaker.benchmarks/java-api-get-string
:args [:param/size]}
{:name :generate-vecs
:fn net.lfn3.undertaker.benchmarks/run-in-prop
:args [:param/times :state/vector-generator]
:options {:ops-per-invocation 100}}
{:name :wrapped-random
:fn net.lfn3.undertaker.benchmarks/repeatedly-get-bytes-from-source
:args [:param/times :state/wrapped-random-source :state/range]
:options {:ops-per-invocation 100}}
{:name :generate-maps
:fn net.lfn3.undertaker.benchmarks/run-in-prop
:args [:param/times :state/map-generator]
:options {:ops-per-invocation 100}}
{:name :generate-string-maps
:fn net.lfn3.undertaker.benchmarks/run-in-prop
:args [:param/times :state/string-map-generator]
:options {:ops-per-invocation 100}}
{:name :map-into-range
:fn net.lfn3.undertaker.bytes/map-into-ranges!
:args [:state/input-arr :state/range]}
{:name :map-into-ranges
:fn net.lfn3.undertaker.bytes/map-into-ranges!
:args [:state/input-arr :state/ranges]}]
:states {:rand-int (partial rand-int 1184841129)
:input-arr (fn [] (byte-array (repeatedly 4 (partial + -128 (rand-int 256)))))
:range (fn [] (vector
[[(rand-int -128)
(rand-int -128)
(rand-int -128)
(rand-int -128)]
[0 0 0 0]]
[[0 0 0 0]
[(rand-int 127)
(rand-int 127)
(rand-int 127)
(rand-int 127)]]))
:ranges (fn [] (vector
[[(+ -128 (rand-int 32))
(+ -128 (rand-int 32))
(+ -128 (rand-int 32))
(+ -128 (rand-int 32))]
[-96 -96 -96 -96]]
[[(+ -96 (rand-int 32))
(+ -96 (rand-int 32))
(+ -96 (rand-int 32))
(+ -96 (rand-int 32))]
[-64 -64 -64 -64]]
[[(+ -64 (rand-int 32))
(+ -64 (rand-int 32))
(+ -64 (rand-int 32))
(+ -64 (rand-int 32))]
[-32 -32 -32 -32]]
[[(+ -32 (rand-int 32))
(+ -32 (rand-int 32))
(+ -32 (rand-int 32))
(+ -32 (rand-int 32))]
[0 0 0 0]]
[[0 0 0 0]
[(rand-int 32)
(rand-int 32)
(rand-int 32)
(rand-int 32)]]
[[32 32 32 32]
[(+ 64 (rand-int 32))
(+ 64 (rand-int 32))
(+ 64 (rand-int 32))
(+ 64 (rand-int 32))]]
[[64 64 64 64]
[(+ 96 (rand-int 32))
(+ 96 (rand-int 32))
(+ 96 (rand-int 32))
(+ 96 (rand-int 32))]]
[[96 96 96 96]
[(+ 128 (rand-int 32))
(+ 128 (rand-int 32))
(+ 128 (rand-int 32))
(+ 128 (rand-int 32))]]))
:wrapped-random-source {:fn net.lfn3.undertaker.source.wrapped-random/make-source
:args [:state/rand-int]}
:map-generator {:fn net.lfn3.undertaker.core/map-of
:args [:state/keyword-gen :state/string-gen]}
:keyword-gen net.lfn3.undertaker.core/keyword
:string-map-generator {:fn net.lfn3.undertaker.core/map-of
:args [:state/string-gen :state/string-gen-alpha]}
:string-gen net.lfn3.undertaker.core/string
:string-gen-alpha net.lfn3.undertaker.core/string
:char-gen net.lfn3.undertaker.core/char
:vector-generator {:fn net.lfn3.undertaker.core/vec-of
:args [:state/char-gen]}
:java-style-string-gen {:fn net.lfn3.undertaker.benchmarks/java-api-get-string
:args [:param/size]}}
:params {:times 100
:size 2048}
:options {:fail-on-error true}}