Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow customizing handling of out-of-range counts when serializing

Open
#41 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
data

Research direction

Start with the serialization handling described in this issue and review the behavior referenced in pull request #40. Define the supported options for counts above i64::max_value(), then verify that serialization follows the selected handling instead of always returning an error.

Written by the indexing model from the issue text.

Description

We allow u64 counts, but the serialization format only allows i64::max_value() as the largest count. So, you can end up with an un-serializable histogram.

It would be nice if the user could choose what to do in such a situation. Right now we always error, which means I needed to do things like https://github.com/jonhoo/hdrsample/pull/40/files#diff-c761d465047faa0efb455f492b2f1e07R528 when testing serialization with random counts.

Options that come to mind:

  • Error (we've got this one now)
  • Squish oversized counts down to i64::max_value()
  • ???
Dominant language
Rust
Stars
373
Forks
50
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HdrHistogram/HdrHistogram_rust

All issues in HdrHistogram/HdrHistogram_rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.