Mercurial > hg > Members > anatofuz > MoarVM
view tools/spesh-time.p6 @ 64:da6d6597bd69 default tip
rollback
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 15 Feb 2019 20:51:54 +0900 |
parents | 2cf249471370 |
children |
line wrap: on
line source
sub MAIN($spesh-log) { with slurp($spesh-log) { my $stats = [+] .match(/:r 'statistics updated in ' <( \d+ )> 'us'/, :g); my $plan = [+] .match(/:r 'planned in ' <( \d+ )> 'us'/, :g); my $spesh = [+] .match(/:r 'Specialization took ' <( \d+ )> 'us'/, :g); my $jit = [+] .match(/:r 'JIT was ' ['not '] ? 'successful and compilation took ' <( \d+ )> 'us'/, :g); say qq:to/REPORT/ Total statistics time: {$stats / 1000}ms Total planning time: {$plan / 1000}ms Total specialization time: {$spesh / 1000}ms Total JIT time: {$jit / 1000}ms REPORT } }