tools: add a separate `scan` column for fast.vlang.io too
parent
d7331f981b
commit
5229428d91
|
@ -47,8 +47,8 @@ fn main() {
|
|||
diff3 := 0 // measure('$vdir/vprod -x64 $vdir/cmd/tools/1mil.v', 'x64 1mil')
|
||||
diff4 := measure('$vdir/vprod -cc clang $vdir/examples/hello_world.v', 'hello.v')
|
||||
vc_size := os.file_size('v.c') / 1000
|
||||
// parse/check/cgen
|
||||
parse, check, cgen := measure_steps(vdir)
|
||||
// scan/parse/check/cgen
|
||||
scan, parse, check, cgen := measure_steps(vdir)
|
||||
// println('Building V took ${diff}ms')
|
||||
commit_date := exec('git log -n1 --pretty="format:%at" $commit')
|
||||
date := time.unix(commit_date.int())
|
||||
|
@ -67,6 +67,7 @@ fn main() {
|
|||
<td>${parse}ms</td>
|
||||
<td>${check}ms</td>
|
||||
<td>${cgen}ms</td>
|
||||
<td>${scan}ms</td>
|
||||
</tr>\n' +
|
||||
table.trim_space()
|
||||
out.writeln(table) ?
|
||||
|
@ -114,9 +115,9 @@ fn measure(cmd string, description string) int {
|
|||
return int(sum / 3)
|
||||
}
|
||||
|
||||
fn measure_steps(vdir string) (int, int, int) {
|
||||
fn measure_steps(vdir string) (int, int, int, int) {
|
||||
resp := os.execute_or_panic('$vdir/vprod -o v.c -show-timings $vdir/cmd/v')
|
||||
mut parse, mut check, mut cgen := 0, 0, 0
|
||||
mut scan, mut parse, mut check, mut cgen := 0, 0, 0, 0
|
||||
lines := resp.output.split_into_lines()
|
||||
if lines.len == 3 {
|
||||
parse = lines[0].before('.').int()
|
||||
|
@ -126,7 +127,9 @@ fn measure_steps(vdir string) (int, int, int) {
|
|||
ms_lines := lines.map(it.split(' ms '))
|
||||
for line in ms_lines {
|
||||
if line.len == 2 {
|
||||
// if line[1] == 'SCAN' { scan = line[0].int() }
|
||||
if line[1] == 'SCAN' {
|
||||
scan = line[0].int()
|
||||
}
|
||||
if line[1] == 'PARSE' {
|
||||
parse = line[0].int()
|
||||
}
|
||||
|
@ -139,5 +142,5 @@ fn measure_steps(vdir string) (int, int, int) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return parse, check, cgen
|
||||
return scan, parse, check, cgen
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
font-family: Menlo, Monospace, 'Courier New';
|
||||
}
|
||||
table {
|
||||
width: 2000px;
|
||||
width: 1800px;
|
||||
}
|
||||
table, td {
|
||||
border-collapse: collapse;
|
||||
|
@ -48,15 +48,16 @@ Source code: <a target=blank href='https://github.com/vlang/v/blob/master/cmd/to
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td style='width:400px'></td>
|
||||
<td style='width:180px'>timestamp</td>
|
||||
<td style='width:85px'>commit</td>
|
||||
<td>commit message</td>
|
||||
<td style='width:120px'>v -o v.c</td>
|
||||
<td style='width:120px'>v -o v</td>
|
||||
<td style='width:130px'>v -x64 1mil.v</td>
|
||||
<td style='width:120px'>v hello.v</td>
|
||||
<td style='width:120px'>v.c size</td>
|
||||
<td style='width:120px'>parse</td>
|
||||
<td style='width:120px'>check</td>
|
||||
<td style='width:120px'>cgen</td>
|
||||
<td style='width:85px'>v.c size</td>
|
||||
<td style='width:55px'>parse</td>
|
||||
<td style='width:55px'>check</td>
|
||||
<td style='width:55px'>cgen</td>
|
||||
<td style='width:55px'>scan</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue