Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created October 31, 2012 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/3989310 to your computer and use it in GitHub Desktop.
Save tenderlove/3989310 to your computer and use it in GitHub Desktop.
ruby$target:::parse-begin
{
parse = timestamp;
}
ruby$target:::parse-end
{
@compile = sum(timestamp - parse);
}
ruby$target:::gc-mark-begin { self->mark = timestamp; }
ruby$target:::gc-sweep-begin { self->sweep = timestamp; }
ruby$target:::gc-mark-end
{
@mark_time = sum(timestamp - self->mark);
}
ruby$target:::gc-sweep-end
{
@sweep_time = sum(timestamp - self->sweep);
}
ruby$target:::find-require-entry
{
req_search = timestamp;
}
ruby$target:::find-require-return
{
@require_search = sum(timestamp - req_search);
}
BEGIN { start = timestamp; }
END {
total = timestamp - start;
printf("mark time (ns): ");
printa("%@d\n", @mark_time);
printf("sweep time (ns): ");
printa("%@d\n", @sweep_time);
printf("compile time (ns): ");
printa("%@d\n", @compile);
printf("require search (ns): ");
printa("%@d\n", @require_search);
printf("total time (ns): %d", total);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment