45
45
HEAD_COL = "head[ms]"
46
46
BASE_COL = "base[ms]"
47
47
48
- parser = argparse .ArgumentParser (description = 'Use vbench to generate a report comparing performance between two commits.' )
48
+ parser = argparse .ArgumentParser (description = 'Use vbench to measure and compare the performance of commits.' )
49
49
parser .add_argument ('-H' , '--head' ,
50
50
help = 'Execute vbenches using the currently checked out copy.' ,
51
51
dest = 'head' ,
64
64
parser .add_argument ('-o' , '--output' ,
65
65
metavar = "<file>" ,
66
66
dest = 'log_file' ,
67
- help = 'path of file in which to save the textual report (default: vb_suite.log).' )
67
+ help = 'Path of file in which to save the textual report (default: vb_suite.log).' )
68
68
parser .add_argument ('-d' , '--outdf' ,
69
69
metavar = "FNAME" ,
70
70
dest = 'outdf' ,
74
74
metavar = "REGEX" ,
75
75
dest = 'regex' ,
76
76
default = "" ,
77
- help = 'regex pat, only tests whose name matches the regext will be run.' )
77
+ help = 'Regex pat, only tests whose name matches the regext will be run.' )
78
78
parser .add_argument ('-s' , '--seed' ,
79
79
metavar = "SEED" ,
80
80
dest = 'seed' ,
81
81
default = 1234 ,
82
82
type = int ,
83
- help = 'integer value to seed PRNG with' )
83
+ help = 'Integer value to seed PRNG with' )
84
84
parser .add_argument ('-n' , '--repeats' ,
85
85
metavar = "N" ,
86
86
dest = 'repeats' ,
87
87
default = 3 ,
88
88
type = int ,
89
- help = 'number of times to run each vbench, result value is the best of' )
89
+ help = 'Number of times to run each vbench, result value is the best of' )
90
90
parser .add_argument ('-c' , '--ncalls' ,
91
91
metavar = "N" ,
92
92
dest = 'ncalls' ,
93
93
default = 3 ,
94
94
type = int ,
95
- help = 'number of calls to in each repetition of a vbench' )
95
+ help = 'Number of calls to in each repetition of a vbench' )
96
96
parser .add_argument ('-N' , '--hrepeats' ,
97
97
metavar = "N" ,
98
98
dest = 'hrepeats' ,
99
99
default = 1 ,
100
100
type = int ,
101
- help = 'implies -H, number of times to run the vbench suite on the head\n '
102
- 'each iteration will yield another column in the output'
101
+ help = 'Implies -H, number of times to run the vbench suite on the head commit. \n '
102
+ 'Each iteration will yield another column in the output. '
103
103
)
104
104
parser .add_argument ('-a' , '--affinity' ,
105
105
metavar = "a" ,
106
106
dest = 'affinity' ,
107
107
default = 1 ,
108
108
type = int ,
109
- help = 'set processor affinity of processm by default bind to cpu/core #1 only'
110
- 'requires the "affinity" python module , will raise Warning otherwise ' )
109
+ help = 'Set processor affinity of the process. THe default is to bind to cpu/core #1 only. '
110
+ 'requires the "affinity" python module. ' )
111
111
112
112
parser .add_argument ('-u' , '--burnin' ,
113
113
metavar = "u" ,
114
114
dest = 'burnin' ,
115
115
default = 1 ,
116
116
type = int ,
117
- help = 'number of extra iteration per benchmark to perform first, then throw away. ' )
117
+ help = 'Number of extra iteration per benchmark to perform first, then throw away. ' )
118
118
119
119
parser .add_argument ('-S' , '--stats' ,
120
120
default = False ,
121
121
action = 'store_true' ,
122
- help = 'when specified with -N, prints s. describe() per vbench. ' )
122
+ help = 'when specified with -N, prints the output of describe() per vbench results . ' )
123
123
124
124
parser .add_argument ('-q' , '--quiet' ,
125
125
default = False ,
126
126
action = 'store_true' ,
127
- help = 'suppress report output to stdout. ' )
127
+ help = 'Suppress report output to stdout. ' )
128
128
129
129
def get_results_df (db , rev ):
130
130
"""Takes a git commit hash and returns a Dataframe of benchmark results
@@ -189,7 +189,7 @@ def profile_comparative(benchmarks):
189
189
prprint ('Baseline [%s] : %s\n ' % (h_baseline ,
190
190
repo .messages .get (h_baseline , "" )))
191
191
192
- prprint ("removing any previous measurements for the commits." )
192
+ prprint ("Removing any previous measurements for the commits." )
193
193
db .delete_rev_results (h_baseline )
194
194
db .delete_rev_results (h_head )
195
195
@@ -394,11 +394,7 @@ def main():
394
394
assert affinity .get_process_affinity_mask (0 ) == args .affinity
395
395
print ("CPU affinity set to %d" % args .affinity )
396
396
except ImportError :
397
- import warnings
398
- print ("\n \n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n " +
399
- "The 'affinity' module is not available, results may be unreliable\n " +
400
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n \n "
401
- )
397
+ print ("Warning: The 'affinity' module is not available." )
402
398
time .sleep (2 )
403
399
404
400
print ("\n " )
@@ -433,8 +429,10 @@ def main():
433
429
# need to be able to reference any commit.
434
430
# modified from vbench.git
435
431
def _parse_commit_log (this ,repo_path ,base_commit = None ):
436
- from vbench .git import parser , _convert_timezones
432
+ from vbench .git import _convert_timezones
437
433
from pandas import Series
434
+ from dateutil import parser as dparser
435
+
438
436
git_cmd = 'git --git-dir=%s/.git --work-tree=%s ' % (repo_path , repo_path )
439
437
githist = git_cmd + ('log --graph --pretty=format:' +
440
438
'\" ::%h::%cd::%s::%an\" ' +
@@ -455,7 +453,7 @@ def _parse_commit_log(this,repo_path,base_commit=None):
455
453
_ , sha , stamp , message , author = line .split ('::' , 4 )
456
454
457
455
# parse timestamp into datetime object
458
- stamp = parser .parse (stamp )
456
+ stamp = dparser .parse (stamp )
459
457
460
458
shas .append (sha )
461
459
timestamps .append (stamp )
0 commit comments