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

tooling: add tools/compare_v_performance_between_commits

easily compare v performance/size across commits.

* fix eprintln on linux (it now uses stderr, and flushes it).

* flag: cleaner usage information.
This commit is contained in:
Delyan Angelov
2019-09-28 14:17:16 +03:00
committed by Alexander Medvednikov
parent 5c79c0e743
commit 366c50674c
6 changed files with 361 additions and 44 deletions

View File

@ -91,14 +91,19 @@ pub fn println(s string) {
pub fn eprintln(s string) {
if isnil(s.str) {
panic('eprintln(NIL)')
}
}
$if mac {
C.fprintf(stderr, '%.*s\n', s.len, s.str)
}
C.fflush(stderr)
return
}
$if linux {
C.fprintf(stderr, '%.*s\n', s.len, s.str)
C.fflush(stderr)
return
}
// TODO issues with stderr and cross compiling for Linux
$else {
println(s)
}
println(s)
}
pub fn print(s string) {