1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fast: checkout each commit

This commit is contained in:
Alexander Medvednikov 2020-08-18 01:11:58 +02:00
parent 40d91cc23b
commit fe5575f384

View File

@ -59,6 +59,8 @@ fn main() {
message := exec('git log --pretty=format:"%s" -n1 $commit')
println('\n${i + 1}/$commits.len Benchmarking commit $commit "$message"')
// Build an optimized V
println('Checking out ${commit}...')
exec('git checkout $commit')
println(' Building vprod...')
exec('v -o $vdir/vprod -prod $vdir/cmd/v')
diff1 := measure('$vdir/vprod -cc clang -o v.c $vdir/cmd/v', 'v.c')
@ -92,6 +94,7 @@ fn main() {
res.writeln(footer)
res.close()
}
exec('git checkout master')
os.write_file('last_commit.txt', commits[commits.len-1])?
}