Skip to content

Instantly share code, notes, and snippets.

@zmccoy
Created July 22, 2026 17:02
Show Gist options
  • Select an option

  • Save zmccoy/23ba5504302971083a60ad96855b1c3f to your computer and use it in GitHub Desktop.

Select an option

Save zmccoy/23ba5504302971083a60ad96855b1c3f to your computer and use it in GitHub Desktop.
Query flow stats:
Summary:
throughput summary: 182515.05 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.162 0.048 0.159 0.215 0.375 1.231
Summary:
throughput summary: 180440.28 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.164 0.064 0.159 0.239 0.415 1.399
Summary:
throughput summary: 167224.08 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.179 0.072 0.159 0.311 0.463 1.223
Summary:
throughput summary: 177242.11 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.166 0.064 0.159 0.263 0.391 1.863
Summary:
throughput summary: 169376.70 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.177 0.064 0.159 0.311 0.471 1.671
Summary:
throughput summary: 181126.61 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.163 0.048 0.159 0.223 0.399 1.335
Summary:
throughput summary: 180505.42 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.164 0.056 0.159 0.247 0.391 1.727
Summary:
throughput summary: 162048.30 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.185 0.080 0.159 0.335 0.495 6.855
Summary:
throughput summary: 171320.89 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.174 0.056 0.159 0.303 0.455 4.119
Summary:
throughput summary: 179372.20 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.165 0.080 0.159 0.263 0.399 2.207
=======================================================================
Query Count Min Sketch:
Summary:
throughput summary: 172235.61 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.172 0.080 0.159 0.287 0.439 15.783
Summary:
throughput summary: 181818.19 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.161 0.080 0.159 0.207 0.319 2.319
Summary:
throughput summary: 182748.53 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.161 0.072 0.159 0.215 0.327 1.415
Summary:
throughput summary: 181389.44 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.162 0.064 0.159 0.215 0.351 2.255
Summary:
throughput summary: 182248.95 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.161 0.056 0.159 0.215 0.311 2.079
Summary:
throughput summary: 181061.03 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.164 0.064 0.159 0.231 0.391 1.879
Summary:
throughput summary: 181389.44 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.164 0.064 0.159 0.223 0.391 1.687
Summary:
throughput summary: 183755.97 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.161 0.056 0.159 0.207 0.319 1.959
Summary:
throughput summary: 172980.45 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.172 0.064 0.159 0.287 0.423 4.583
Summary:
throughput summary: 176335.75 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.170 0.056 0.159 0.279 0.439 1.903
Count-Min-Sketch seems to be a little bit quicker for estimating in the CMS.QUERY.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!! INCRBY Results !!!!!!!!!!!!!!!!!!!!!!!!!!!
Flowstats--------
Summary:
throughput summary: 177714.59 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.172 0.064 0.167 0.255 0.431 1.599
Summary:
throughput summary: 165234.62 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.186 0.080 0.167 0.327 0.495 14.863
Summary:
throughput summary: 179147.27 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.169 0.072 0.159 0.231 0.391 1.287
Summary:
throughput summary: 182282.17 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.166 0.072 0.159 0.223 0.327 2.359
Summary:
throughput summary: 178826.89 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.170 0.088 0.159 0.239 0.399 1.415
Summary:
throughput summary: 177210.70 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.173 0.064 0.159 0.271 0.431 1.327
Summary:
throughput summary: 178922.88 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.171 0.072 0.159 0.247 0.415 1.847
Summary:
throughput summary: 181389.44 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.167 0.080 0.159 0.223 0.359 1.623
Summary:
throughput summary: 174428.75 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.174 0.072 0.167 0.287 0.415 1.735
Summary:
throughput summary: 174216.03 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.175 0.072 0.167 0.279 0.431 1.423
========= rust-count-min-sketch results==========
Summary:
throughput summary: 133582.69 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.238 0.080 0.207 0.423 0.559 5.191
Summary:
throughput summary: 144906.53 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.220 0.072 0.183 0.407 0.527 2.279
Summary:
throughput summary: 148126.20 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.214 0.064 0.183 0.391 0.527 1.767
Summary:
throughput summary: 145264.39 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.221 0.072 0.183 0.415 0.535 1.463
Summary:
throughput summary: 147688.67 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.216 0.064 0.183 0.399 0.527 1.543
Summary:
throughput summary: 132450.33 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.234 0.088 0.215 0.391 0.527 4.455
Summary:
throughput summary: 140449.44 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.222 0.064 0.191 0.391 0.535 2.847
Summary:
throughput summary: 147232.05 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.216 0.088 0.183 0.399 0.527 1.527
Summary:
throughput summary: 147797.81 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.215 0.064 0.183 0.399 0.527 2.223
Summary:
throughput summary: 141984.94 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.223 0.056 0.183 0.399 0.535 4.959
Summary:
throughput summary: 147557.92 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.213 0.056 0.183 0.383 0.519 1.983
Flowstats seems to be faster doing INCRBY.
@KarthikSubbarao

KarthikSubbarao commented Jul 23, 2026

Copy link
Copy Markdown

Thanks for the perf test results. Both crates seem pretty close in terms of the QUERY command. However, INCRBY is where we see flowstats being ~20-25% faster

  • Performance wise both seem fine, but Flowstats is better
  • MemoryUsage wise, let's confirm which one of them is better by testing different CountMinSketch object creations using different configs. From the README, Flowstats is documented to be space efficient.
  • Usage/Downloads wise, rust-count-min-sketch wins. rust-count-min-sketch has 1,181,004 and Flowstats has 496

If the performance and memory usage of the two are identical, then we can open up an issue on both repos listing the changes we require for the module data type - and we can go with the repository whose Author is open to accepting the requested changes (or if they will implement it themselves)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment