Skip to content

Instantly share code, notes, and snippets.

@thomasdarimont
thomasdarimont / Redis_Stats.md
Last active January 31, 2023 17:27
Example for computing various running statistics with Lua in Redis backed by a hash

Running statistics with Redis and Lua

This is an example for computing running statistics with Lua backed by a hash in Redis. We support counting, average (with and without exponential smoothing), stddev, variance, min, max, sum of observed values. An example for approximating a running median can be found here: https://gist.github.com/thomasdarimont/fff68191d45a001b2d84

Data structure

We use a hash for storing various statistic value under the key "stats_value" in redis. Note: If you need a specific alpha value for smoothing the average, then set the desired alpha -> e.g. alpha 0.7. If alpha is 0.0 then no smoothing is applied.

@davidfowl
davidfowl / dotnetlayout.md
Last active November 13, 2024 13:19
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/