@@ -179,6 +179,7 @@ def get_software_metadata(self, index, role, browbeat_uuid):
179
179
this function will iterate through all the data points, combining the iteration
180
180
and rerun data points into a single 95%tile.
181
181
"""
182
+
182
183
def summarize_results (self , data , combined ):
183
184
summary = {}
184
185
if combined :
@@ -240,6 +241,7 @@ def summarize_results(self, data, combined):
240
241
241
242
"""
242
243
"""
244
+
243
245
def compare_rally_results (self , data , uuids , combined , metadata = None ):
244
246
missing = []
245
247
if len (data ) < 2 :
@@ -249,13 +251,13 @@ def compare_rally_results(self, data, uuids, combined, metadata=None):
249
251
self .logger .error ("Not able to find UUID in data set" )
250
252
return False
251
253
if combined :
252
- print "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 23 ))
253
- print "{0:33} | {1:40} | {2:10} | {3:10} | {4:13} " .format ("Scenario" ,
254
+ print ( "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 23 ) ))
255
+ print ( "{0:33} | {1:40} | {2:10} | {3:10} | {4:13} " .format ("Scenario" ,
254
256
"Action" ,
255
257
uuids [0 ][- 8 :],
256
258
uuids [1 ][- 8 :],
257
- "% Difference" )
258
- print "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 23 ))
259
+ "% Difference" ))
260
+ print ( "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 23 ) ))
259
261
for scenario in data [uuids [0 ]]:
260
262
if scenario not in data [uuids [1 ]]:
261
263
missing .append (scenario )
@@ -268,23 +270,23 @@ def compare_rally_results(self, data, uuids, combined, metadata=None):
268
270
perf1 = data [uuids [1 ]][scenario ][action ]
269
271
diff = numpy .diff (dset )[0 ] / numpy .abs (dset [:- 1 ])[0 ] * 100
270
272
271
- print "{0:33} | {1:40} | {2:10.3f} | {3:10.3f} | {4:13.3f}" .format (scenario ,
273
+ print ( "{0:33} | {1:40} | {2:10.3f} | {3:10.3f} | {4:13.3f}" .format (scenario ,
272
274
action ,
273
275
perf0 ,
274
276
perf1 ,
275
- diff )
276
- print "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 26 ))
277
+ diff ))
278
+ print ( "+{}+" .format ("-" * (33 + 44 + 10 + 10 + 26 ) ))
277
279
else :
278
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ))
279
- print "{0:33} | {1:40} | {2:15} | {3:15} | {4:10} | {5:10} | {6:23}" .format (
280
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ) ))
281
+ print ( "{0:33} | {1:40} | {2:15} | {3:15} | {4:10} | {5:10} | {6:23}" .format (
280
282
"Scenario" ,
281
283
"Action" ,
282
284
"times" ,
283
285
"concurrency" ,
284
286
uuids [0 ][- 8 :],
285
287
uuids [1 ][- 8 :],
286
- "% Difference" )
287
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ))
288
+ "% Difference" ))
289
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ) ))
288
290
for scenario in data [uuids [0 ]]:
289
291
if scenario not in data [uuids [1 ]]:
290
292
missing .append (scenario )
@@ -314,38 +316,39 @@ def compare_rally_results(self, data, uuids, combined, metadata=None):
314
316
diff = numpy .diff (dset )[0 ] / numpy .abs (dset [:- 1 ])[0 ] * 100
315
317
output = "{0:33} | {1:40} | {2:15} | {3:15} "
316
318
output += "| {4:10.3f} | {5:10.3f} | {6:13.3f}"
317
- print output .format (scenario ,
319
+ print ( output .format (scenario ,
318
320
action ,
319
321
times ,
320
322
concurrency ,
321
323
perf0 ,
322
324
perf1 ,
323
- diff )
324
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ))
325
+ diff ))
326
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 10 + 10 + 26 ) ))
325
327
if metadata :
326
- print "+{}+" .format ("-" * (40 + 20 + 20 + 33 ))
327
- print "{0:40} | {1:20} | {2:20} | {3:20}" .format ("UUID" , "Version" , "Build" ,
328
- "Number of runs" )
329
- print "+{}+" .format ("-" * (40 + 20 + 20 + 33 ))
328
+ print ( "+{}+" .format ("-" * (40 + 20 + 20 + 33 ) ))
329
+ print ( "{0:40} | {1:20} | {2:20} | {3:20}" .format ("UUID" , "Version" , "Build" ,
330
+ "Number of runs" ))
331
+ print ( "+{}+" .format ("-" * (40 + 20 + 20 + 33 ) ))
330
332
for uuids in metadata :
331
- print "{0:40} | {1:20} | {2:20} | {3:20}" .format (uuids ,
333
+ print ( "{0:40} | {1:20} | {2:20} | {3:20}" .format (uuids ,
332
334
metadata [uuids ][
333
335
'version' ],
334
336
metadata [uuids ][
335
337
'build' ],
336
- metadata [uuids ]['rerun' ])
338
+ metadata [uuids ]['rerun' ]))
337
339
338
- print "+{}+" .format ("-" * (40 + 20 + 20 + 33 ))
340
+ print ( "+{}+" .format ("-" * (40 + 20 + 20 + 33 ) ))
339
341
if len (missing ) > 0 :
340
- print "+-------------------------------------+"
341
- print "Missing Scenarios to compare results:"
342
- print "+-------------------------------------+"
342
+ print ( "+-------------------------------------+" )
343
+ print ( "Missing Scenarios to compare results:" )
344
+ print ( "+-------------------------------------+" )
343
345
for scenario in missing :
344
- print " - {}" .format (scenario )
346
+ print ( " - {}" .format (scenario ) )
345
347
346
348
"""
347
349
returns a list of dicts that contain 95%tile performance data.
348
350
"""
351
+
349
352
def get_result_data (self , index , browbeat_uuid ):
350
353
results = []
351
354
data = []
@@ -395,6 +398,7 @@ def get_version_metadata(self, index, browbeat_uuid):
395
398
Currently this function will only compare two uuids. I (rook) am not convinced it is worth
396
399
the effort to engineer anything > 2.
397
400
"""
401
+
398
402
def compare_metadata (self , index , role , uuids ):
399
403
meta = []
400
404
for browbeat_uuid in uuids :
@@ -490,24 +494,24 @@ def compare_metadata(self, index, role, uuids):
490
494
"Host [{}] Service [{}] {} [{}]" .format (
491
495
uuids [1 ], host , service , options , key ))
492
496
493
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ))
494
- print "{0:25} | {1:15} | {2:30} | {3:23} | {4:40} | {5:40} " .format (
497
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ) ))
498
+ print ( "{0:25} | {1:15} | {2:30} | {3:23} | {4:40} | {5:40} " .format (
495
499
"Host" ,
496
500
"Service" ,
497
501
"Option" ,
498
502
"Key" ,
499
503
"Old Value" ,
500
- "New Value" )
501
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ))
502
- for difference in differences :
504
+ "New Value" ))
505
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ) ))
506
+ for difference in differences :
503
507
value = difference .split ("|" )
504
- print "{0:25} | {1:15} | {2:30} | {3:23} | {4:40} | {5:40} " .format (value [0 ],
508
+ print ( "{0:25} | {1:15} | {2:30} | {3:23} | {4:40} | {5:40} " .format (value [0 ],
505
509
value [1 ],
506
510
value [2 ],
507
511
value [3 ],
508
512
value [4 ],
509
- value [5 ])
510
- print "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ))
513
+ value [5 ]))
514
+ print ( "+{}+" .format ("-" * (33 + 44 + 15 + 15 + 30 + 10 + 6 ) ))
511
515
512
516
def scroll (self , search , sid , scroll_size ):
513
517
data = []
@@ -528,6 +532,7 @@ def scroll(self, search, sid, scroll_size):
528
532
index, however, this is quite expensive, and it might be quicker to
529
533
only look for errors for specific browbeat_uuids
530
534
"""
535
+
531
536
def get_errors (self , index , browbeat_id ):
532
537
self .logger .info ("Making query against {}" .format (index ))
533
538
page = self .es .search (
0 commit comments