Created
October 31, 2012 19:36
-
-
Save tenderlove/3989310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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