Skip to content

fix all clippies, update the name of the .cargo/config.toml file in t…#57

Open
zooko wants to merge 5 commits intobazhenov:devfrom
zooko:dev
Open

fix all clippies, update the name of the .cargo/config.toml file in t…#57
zooko wants to merge 5 commits intobazhenov:devfrom
zooko:dev

Conversation

@zooko
Copy link
Copy Markdown

@zooko zooko commented Aug 16, 2025

…he README

Denis, you might want to double-check that you intended to do that mut-from-ref thing. I just assumed it was okay and added the clippy setting to allow it.

…he README

Denis, you might want to double-check that you intended to do that mut-from-ref
thing. I just assumed it was okay and added the clippy setting to allow it.
Zsomething added 3 commits August 15, 2025 18:55
…sted and this is a unix platform

My experimentation indicates that CLOCK_THREAD_CPUTIME_ID is better because it
doesn't count time against your code-under-test while its thread is suspended.
See bazhenov#53
because

thread 'main' panicked at /Users/donaldturnworth/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.40/src/builder/debug_asserts.rs:112:17:
Command compare: Short option names must be unique for each argument, but '-g' is in use by both 'gnuplot' and 'significant_only'
@bazhenov
Copy link
Copy Markdown
Owner

Unfortunately, we can't just swap out the standard timer with THREAD_CPUTIME without losing generality. THREAD_CPUTIME and MONOTONIC_TIME measure different things. THREAD_CPUTIME excludes time spent in blocking syscalls, so it underestimates the execution time of algorithms that use both CPU and blocking calls.

One thing we can do is to allow user to select specific timer when defining a benchmark. Somethings like that:

benchmark_fn("sum", |b| b.timer(CpuTime).iter(|| sum(5000)))

@bazhenov
Copy link
Copy Markdown
Owner

bazhenov commented Aug 23, 2025

I've implemented #60 that brings custom metrics (see #60 comments for usage example). Now we can implement CpuTime as a separate metric to measure. I believe we have no obstacles to implementing your idea in tango code base.

@zookoatshieldedlabs
Copy link
Copy Markdown

I've implemented #60 that brings custom metrics (see #60 comments for usage example). Now we can implement CpuTime as a separate metric to measure. I believe we have no obstacles to implementing your idea in tango code base.

Cool, thanks!

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.

3 participants