@@ -38,8 +38,8 @@ def run_benchmarks(control, experiment, benchmark_dir, benchmarks, trials,
38
38
raise ValueError ('Profile directory "%s" does not exist' % profile_dir )
39
39
print ("Recording profile data to '%s'" % profile_dir )
40
40
41
- control_label = get_django_version (control , vcs = vcs )
42
- experiment_label = get_django_version (experiment , vcs = vcs )
41
+ control_label , control_commit = get_django_version (control , vcs = vcs )
42
+ experiment_label , experiment_commit = get_django_version (experiment , vcs = vcs )
43
43
branch_info = "%s branch " % vcs if vcs else ""
44
44
print ("Control: Django %s (in %s%s)" % (control_label , branch_info , control ))
45
45
print ("Experiment: Django %s (in %s%s)" % (experiment_label , branch_info , experiment ))
@@ -100,7 +100,9 @@ def run_benchmarks(control, experiment, benchmark_dir, benchmarks, trials,
100
100
name = benchmark ,
101
101
result = result ,
102
102
control = control_label ,
103
+ control_commit = control_commit ,
103
104
experiment = experiment_label ,
105
+ experiment_commit = experiment_commit ,
104
106
control_data = control_data ,
105
107
experiment_data = experiment_data ,
106
108
)
@@ -257,7 +259,8 @@ def get_django_version(loc, vcs=None):
257
259
[sys .executable , '-c' 'import django; print(django.get_version())' ],
258
260
env = {'PYTHONPATH' : pythonpath }
259
261
)
260
- return out .strip ()
262
+ commit_out , commit_err , _ = perf .CallAndCaptureOutput (['git' , 'rev-parse' , 'HEAD' ])
263
+ return out .strip (), commit_out .strip ()
261
264
262
265
263
266
def switch_to_branch (vcs , branchname , do_cleanup = False ):
0 commit comments