Skip to content

Instantly share code, notes, and snippets.

@ecin
Created August 21, 2009 18:43
Show Gist options
  • Save ecin/172307 to your computer and use it in GitHub Desktop.
Save ecin/172307 to your computer and use it in GitHub Desktop.
// Save the time a request comes in
rack*:::request_start
{
self->start = timestamp;
self->flip = 1;
}
// Save the request's path
rack*:::path
/ self->flip == 1 /
{
self->path = copyinstr((int) arg0);
}
// Save the difference between the request's start and finish for its path
rack*:::request_finish
{
@length[self->path] = quantize(timestamp - self->start);
self->flip = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment