Skip to content

Instantly share code, notes, and snippets.

@ecin
Created June 2, 2009 04:20
Show Gist options
  • Save ecin/122010 to your computer and use it in GitHub Desktop.
Save ecin/122010 to your computer and use it in GitHub Desktop.
/*
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