Skip to content

fix: proto benchmark key collision and memory DBSIZE parsing#157

Merged
kacy merged 1 commit intomainfrom
fix/bench-proto-memory
Feb 16, 2026
Merged

fix: proto benchmark key collision and memory DBSIZE parsing#157
kacy merged 1 commit intomainfrom
fix/bench-proto-memory

Conversation

@kacy
Copy link
Owner

@kacy kacy commented Feb 16, 2026

summary

fixes two benchmark bugs found during GCP testing:

  1. bench-proto.py: warmup keys used the same warmup: prefix for both raw SET and PROTO.SET operations. when raw GET later reads those keys, it hits proto-typed values and crashes with WRONGTYPE. fixed by using distinct prefixes (raw_warmup: for raw ops, proto_warmup: for proto ops).

  2. bench-memory.sh: ember's DBSIZE returns a bare number (8605) while redis returns (integer) 8605. the script used awk '{print $2}' which only matched the redis format, returning empty for ember — making all byte/key calculations divide by zero and report 0. switched to awk '{print $NF}' which handles both.

what was tested

  • debugged on GCP c2-standard-8 by stepping through the measurement pipeline
  • verified awk '{print $NF}' works for both ember and redis DBSIZE output formats
  • confirmed ember's INFO memory returns non-zero used_memory after data load

proto benchmark: warmup keys used the same prefix for both raw SET and
PROTO.SET, causing WRONGTYPE errors when raw GET hit proto-typed keys.
use distinct prefixes (raw_warmup: vs proto_warmup:) for each benchmark.

memory benchmark: ember returns DBSIZE as a bare number (e.g. "8605")
while redis returns "(integer) 8605". awk '{print $2}' only worked for
redis format, returning empty for ember — causing 0 bytes/key. switched
to awk '{print $NF}' which handles both formats.
@kacy kacy merged commit 01c8c90 into main Feb 16, 2026
7 checks passed
@kacy kacy deleted the fix/bench-proto-memory branch February 16, 2026 03:24
kacy added a commit that referenced this pull request Feb 19, 2026
#157)

proto benchmark: warmup keys used the same prefix for both raw SET and
PROTO.SET, causing WRONGTYPE errors when raw GET hit proto-typed keys.
use distinct prefixes (raw_warmup: vs proto_warmup:) for each benchmark.

memory benchmark: ember returns DBSIZE as a bare number (e.g. "8605")
while redis returns "(integer) 8605". awk '{print $2}' only worked for
redis format, returning empty for ember — causing 0 bytes/key. switched
to awk '{print $NF}' which handles both formats.
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.

1 participant