Skip to content

save_csv does not report proper latency distribution - #10

Merged
oranagra merged 3 commits into
redis:masterfrom
samanbarghi:master
May 23, 2016
Merged

oranagra merged 3 commits into
redis:masterfrom
samanbarghi:master

Conversation

@samanbarghi

Copy link
Copy Markdown
Contributor

when running memtier_benchmark along with --client-stats the printed latency distributions are not actual latencies. Moreover, SET ops percentage are false ( greater than 100% and calculated using total_get_ops).

in save_csv, SET ops latency distribution is using the total_get_ops
and provides incorrect results. This is changed to total_set_ops to
reflect the total number of SET operations.
In save_csv before reporting SET operation latency, the
total_count_float variable is not being reset to 0 and thus SET ops
shows > 100%. This number should be reset to 0.
In save_csv instead of showing the actual latency, a counter is
being printed to the csv files which is misleading and does not
correlate with latency. The counter is replaced with the actual
latency number.
@oranagra
oranagra merged commit 7f1e943 into redis:master May 23, 2016
@oranagra

Copy link
Copy Markdown
Member

sorry for the delay, thanks for fixing.

fcostaoliveira added a commit that referenced this pull request May 10, 2026
Adds four RLTest cases that observably exercise the Bugbot-found bugs
that previously had no automated coverage (verified only via local
smoke tests):

- test_arbitrary_spop_with_count_empty_array_is_miss   (#7)
  Pre-loads 3 sets * 5 members, runs SPOP key COUNT 1; without the *0
  null-sentinel fix, every call would record a hit. With the fix only
  ~15 destructive pops succeed and the rest report misses.

- test_arbitrary_blpop_variadic_keys_single_bucket    (#6)
  Pre-loads memtier-1 with enough items for every BLPOP call to return
  immediately, and verifies "Per-Key Misses" carries exactly key[0]
  (not key[0..2]). Without the fix, response->get_hits()=2 from the
  [key, value] reply would mark two of three buckets as hit and one
  as miss per call.

- test_arbitrary_xread_keyword_spec_evaluates_correctly (#4 Keyword)
  Pre-loads 3 streams; XREAD COUNT 1 STREAMS __key__ 0 across a 10-key
  range must produce both hits and misses, proving the Keyword
  begin_search resolved correctly. Without the args[idx] fix, the
  STREAMS keyword search would land on the wrong slot.

- test_arbitrary_eval_keynum_spec_runs_cleanly         (#4 Keynum)
  EVAL return 1 1 __key__ exercises the Keynum begin_search path.
  EVAL is NotMissable, so we assert no Per-Key entry but Count > 0,
  proving resolve_command_meta read numkeys from the right slot.

Findings #2 (lazy resize), #5 (empty bulk), #8 (alloc hygiene),
#9 (mbulk NULL), #10 (default switch) and #11 (Range step>1) remain
without dedicated tests because they're either parser-collapsed
(#5), defensive/unreachable (#9, #10, #11), or non-functional (#8);
documented in PR comments.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fcostaoliveira added a commit that referenced this pull request May 27, 2026
Adds four RLTest cases that observably exercise the Bugbot-found bugs
that previously had no automated coverage (verified only via local
smoke tests):

- test_arbitrary_spop_with_count_empty_array_is_miss   (#7)
  Pre-loads 3 sets * 5 members, runs SPOP key COUNT 1; without the *0
  null-sentinel fix, every call would record a hit. With the fix only
  ~15 destructive pops succeed and the rest report misses.

- test_arbitrary_blpop_variadic_keys_single_bucket    (#6)
  Pre-loads memtier-1 with enough items for every BLPOP call to return
  immediately, and verifies "Per-Key Misses" carries exactly key[0]
  (not key[0..2]). Without the fix, response->get_hits()=2 from the
  [key, value] reply would mark two of three buckets as hit and one
  as miss per call.

- test_arbitrary_xread_keyword_spec_evaluates_correctly (#4 Keyword)
  Pre-loads 3 streams; XREAD COUNT 1 STREAMS __key__ 0 across a 10-key
  range must produce both hits and misses, proving the Keyword
  begin_search resolved correctly. Without the args[idx] fix, the
  STREAMS keyword search would land on the wrong slot.

- test_arbitrary_eval_keynum_spec_runs_cleanly         (#4 Keynum)
  EVAL return 1 1 __key__ exercises the Keynum begin_search path.
  EVAL is NotMissable, so we assert no Per-Key entry but Count > 0,
  proving resolve_command_meta read numkeys from the right slot.

Findings #2 (lazy resize), #5 (empty bulk), #8 (alloc hygiene),
#9 (mbulk NULL), #10 (default switch) and #11 (Range step>1) remain
without dedicated tests because they're either parser-collapsed
(#5), defensive/unreachable (#9, #10, #11), or non-functional (#8);
documented in PR comments.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants