Skip to content

Instantly share code, notes, and snippets.

@dwarring
Last active April 27, 2018 08:14
Show Gist options
  • Save dwarring/2079e0773c29eebb4caf4d685f53c55c to your computer and use it in GitHub Desktop.
Save dwarring/2079e0773c29eebb4caf4d685f53c55c to your computer and use it in GitHub Desktop.
Pastable Rakudo profile routines query (https://docs.perl6.org/language/performance)
.mode columns
.headers on
.width 80
select
case when r.name = "" then "<anon>" else r.name end || " / " || r.file as "name/file",
r.line as "line",
sum(entries) as entries,
sum(case when rec_depth = 0 then inclusive_time else 0 end)/1000.0 as "inclusive(s)",
sum(exclusive_time)/1000.0 as "exclusive(s)"
from
calls c,
routines r
where
c.id = r.id
group by
c.id
order by
inclusive_time desc
limit 30;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment