Skip to content

Commit fe5575f

Browse files
committed
fast: checkout each commit
1 parent 40d91cc commit fe5575f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/tools/fast/fast.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ fn main() {
5959
message := exec('git log --pretty=format:"%s" -n1 $commit')
6060
println('\n${i + 1}/$commits.len Benchmarking commit $commit "$message"')
6161
// Build an optimized V
62+
println('Checking out ${commit}...')
63+
exec('git checkout $commit')
6264
println(' Building vprod...')
6365
exec('v -o $vdir/vprod -prod $vdir/cmd/v')
6466
diff1 := measure('$vdir/vprod -cc clang -o v.c $vdir/cmd/v', 'v.c')
@@ -92,6 +94,7 @@ fn main() {
9294
res.writeln(footer)
9395
res.close()
9496
}
97+
exec('git checkout master')
9598
os.write_file('last_commit.txt', commits[commits.len-1])?
9699
}
97100

0 commit comments

Comments
 (0)