Skip to content

Adding error writing and changing prints to debug mode - #24

Closed
elad-ash wants to merge 1 commit into
masterfrom
add-json-error
Closed

elad-ash wants to merge 1 commit into
masterfrom
add-json-error

Conversation

@elad-ash

Copy link
Copy Markdown
Contributor

This adds Error reporting as part of the JSON output for situation that memtier exit with errors + change some printing to debug mode

@elad-ash elad-ash closed this Mar 30, 2017
fcostaoliveira added a commit that referenced this pull request Jun 2, 2026
…/0 (#436)

* fix(opts): reject negative -c/-t/-n/--test-time; guard Hits/sec from /0

Same crash class as merged phases #428/#429 (--pipeline, --data-size,
--run-count): strtoul("-1") wraps to UINT_MAX and -c -1 then tries to
spawn ~4B clients. The four count flags missed the phase-2 sweep.

Also adds a > 0 guard to run_stats.cpp summarize() for the legacy GET
Hits/sec / Misses/sec computation (the only summarize site without one);
sub-microsecond runs were emitting +Inf / nan into the JSON.

Refs: 2.4 review findings #24 + #19

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(stats): guard all summarize() rate computations from /0; standardize error wording

Reviewers R3+R4 flagged that the prior commit only guarded m_hits_sec
and m_misses_sec in summarize(); six sibling rate computations
(m_ops_sec, m_bytes_sec, m_bytes_sec_rx, m_bytes_sec_tx, m_moved_sec,
m_ask_sec, m_connection_errors_sec) still divided by test_duration_usec
with no guard. All now use the (test_duration_usec > 0 ? ... : 0.0)
ternary, consistent with sites at lines 1300, 1311, 1317, 1344, 1354,
1360, 1627, 1629.

R5 also flagged that the four new error messages mixed "must be a
positive integer" and "must be greater than zero". Standardized to
match the phase-2 convention.

Refs: 2.4 review of PR #436 (R3/R4/R5).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[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.

1 participant