Skip to content

Instantly share code, notes, and snippets.

@reklis
Created September 6, 2013 16:32
Show Gist options
  • Save reklis/6466306 to your computer and use it in GitHub Desktop.
Save reklis/6466306 to your computer and use it in GitHub Desktop.
FunnelCake definition for basic web log analysis using BrightContext
INPUT requests;
// example: { action: 'GET', path: '/', code: 200 }
OUTPUT requestmetrics;
// send out the number of requests in that window every 5 seconds
requestmetrics = GROUP requests
BY TIMEONLY
SAMPLERATE 5
AGG FC.count("5SEC") AS requestCount, // the current real-time count
FC.count("ALL") AS totalCount; // the all time count, cumulative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment