3
3
from matplotlib .ticker import FormatStrFormatter
4
4
5
5
inputFile = "jmh-result.csv"
6
- outputFile = "flatten-merge-plots .svg"
7
- elements = 10000
8
- benchmarkName = "benchmarks.flow.FlattenMergeBenchmark .flattenMerge"
6
+ outputFile = "flow- flatten-merge.svg"
7
+ elements = 100000
8
+ benchmarkName = "benchmarks.flow.FlowFlattenMergeBenchmark .flattenMerge"
9
9
10
10
markers = ['.' , 'v' , '^' , '1' , '2' , '8' , 'p' , 'P' , 'x' , 'D' , 'd' , 's' ]
11
11
colours = ['black' , 'silver' , 'red' , 'gold' , 'sienna' , 'olivedrab' , 'lightseagreen' , 'navy' , 'blue' , 'm' , 'crimson' , 'yellow' , 'orangered' , 'slateblue' , 'aqua' ]
@@ -29,7 +29,7 @@ def draw(data, plt):
29
29
plt .gca ().xaxis .set_major_formatter (FormatStrFormatter ('%0.f' ))
30
30
plt .grid (linewidth = '0.5' , color = 'lightgray' )
31
31
plt .ylabel (data .unit .unique ()[0 ])
32
- plt .xlabel ('parallelism ' )
32
+ plt .xlabel ('concurrency ' )
33
33
plt .xticks (data .concurrency .unique ())
34
34
35
35
colourGen = next_colour ()
@@ -39,13 +39,11 @@ def draw(data, plt):
39
39
genMarker = next (markerGen )
40
40
res = data [(data .flows == flows )]
41
41
plt .plot (res .concurrency , res .score * elements , label = "flows={}" .format (flows ), color = genColour , marker = genMarker )
42
-
43
- def genFile ():
44
- data = pd .read_table (inputFile , sep = "," , skiprows = 1 , names = ["benchmark" ,"mode" ,"threads" ,"samples" ,"score" ,"scoreError" ,"unit" ,"concurrency" ,"flows" ])
45
- plt .figure (figsize = (20 , 20 ))
46
- draw (data , plt )
47
- plt .legend (loc = 'upper center' , borderpad = 0 , ncol = 4 , frameon = False , borderaxespad = 4 , prop = {'size' : 8 })
48
- plt .tight_layout (pad = 12 , w_pad = 2 , h_pad = 1 )
49
- plt .savefig (outputFile , bbox_inches = 'tight' )
50
-
51
- genFile ()
42
+ plt .errorbar (x = res .concurrency , y = res .score * elements , yerr = res .scoreError * elements , solid_capstyle = 'projecting' , capsize = 5 )
43
+
44
+ data = pd .read_table (inputFile , sep = "," , skiprows = 1 , names = ["benchmark" ,"mode" ,"threads" ,"samples" ,"score" ,"scoreError" ,"unit" ,"concurrency" ,"flows" ])
45
+ plt .figure (figsize = (20 , 20 ))
46
+ draw (data , plt )
47
+ plt .legend (loc = 'upper center' , borderpad = 0 , ncol = 4 , frameon = False , borderaxespad = 4 , prop = {'size' : 8 })
48
+ plt .tight_layout (pad = 12 , w_pad = 2 , h_pad = 1 )
49
+ plt .savefig (outputFile , bbox_inches = 'tight' )
0 commit comments