Created
June 2, 2009 04:20
-
-
Save ecin/122010 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
/* | |
To check for requests, just use an empty middleware, and check for call()s to it. In our case, use Rack::Probe. We can later add more probes to log env data._ | |
This way requires a patched Ruby to be used though. mri_instrumentation must have a better way._ | |
*/ | |
:::function-entry | |
/copyinstr((int) arg0) == "Rack::Probe" && copyinstr((int) arg1) == "call"/ | |
{ | |
printf("Class: %s \t Method: %s\t", copyinstr((int) arg0), copyinstr((int) arg1)); | |
trace(timestamp); | |
printf("\n"); | |
} | |
:::function-return | |
/copyinstr((int) arg0) == "Rack::Probe" && copyinstr((int) arg1) == "call"/ | |
{ | |
printf("Class: %s \t Method: %s\t", copyinstr((int) arg0), copyinstr((int) arg1)); | |
trace(timestamp); | |
printf("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment