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:

committed by
Alexander Medvednikov

parent
5c79c0e743
commit
366c50674c
@ -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) {
|
||||
|
Reference in New Issue
Block a user