Skip to content

Instantly share code, notes, and snippets.

View dwinrick-lever's full-sized avatar

Devon Winrick dwinrick-lever

  • @lever.co
  • San Jose, CA
View GitHub Profile
@jdaigle
jdaigle / gist:bdf55889b0935b3f6775
Last active November 1, 2021 22:31
Stats Aggregation and SQL Time Series Database
  • We can implement something like https://github.com/etsy/statsd. This will collect and aggregate metrics.
  • At pre-defined intervals (say... every 10 seconds), these metrics are flushed to a backend store
  • We could use SQL Server to store the metrics:

#SQL Schema

  • Each series is a seperate table containing a timestamp epoch (bigint) and a value (float)
  • Rows are inserted, timestamp is the PK

#Example Query