Skip to content

benchmark creates new tokio runtime on every iterationΒ #4055

@hieuit095

Description

@hieuit095

Description

The benchmark function b.iter(|| { let rt = Runtime::new().unwrap(); rt.block_on(...) }) creates a new Tokio runtime on every iteration. This is extremely expensive and will skew benchmark results significantly, causing measurements to include runtime creation overhead repeatedly.

Severity: medium
File: iroh-dns-server/benches/write.rs

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    πŸ— In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions