Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ jobs:
with:
scope: ${{ matrix.name }}

- name: Warm up repository
uses: ./.github/actions/warm-up-repo

- name: Build the benchmark target
run: turbo run build:codspeed --filter=${{ matrix.name }}

Expand Down
47 changes: 31 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ quote = { version = "1.0.41", default-features = fa
rand = { version = "0.10.0", default-features = false }
rand_core = { version = "0.10.0", default-features = false }
rand_distr = { version = "0.6.0", default-features = false }
rand_xoshiro = { version = "0.8.1" }
rapidfuzz = { version = "0.5.0", default-features = false }
ratatui = { version = "0.30.0" }
rayon = { version = "1.11.0", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions apps/hash-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ futures = { workspace = true }
jsonwebtoken = { workspace = true }
mimalloc = { workspace = true }
multiaddr = { workspace = true }
rayon = { workspace = true }
regex = { workspace = true }
reqwest = { workspace = true, features = ["rustls"] }
simple-mermaid = { workspace = true }
Expand Down
26 changes: 17 additions & 9 deletions apps/hash-graph/docs/dependency-diagram.mmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion apps/hash-graph/src/subcommand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod snapshot;
mod type_fetcher;

use core::time::Duration;
use std::time::Instant;
use std::{thread::available_parallelism, time::Instant};

use clap::Parser;
use error_stack::{Report, ensure};
Expand Down Expand Up @@ -141,11 +141,22 @@ pub enum Subcommand {
ReindexCache(Box<ReindexCacheArgs>),
}

#[expect(clippy::integer_division, clippy::integer_division_remainder_used)]
fn block_on(
future: impl Future<Output = Result<(), Report<GraphError>>>,
service_name: &'static str,
tracing_config: TracingConfig,
) -> Result<(), Report<GraphError>> {
rayon::ThreadPoolBuilder::new()
.num_threads(
available_parallelism()
.map_or(1, |cores| cores.get() / 2)
.max(1),
)
.thread_name(|index| format!("rayon-{index}"))
.build_global()
.expect("rayon pool should be initialized exactly once");
Comment thread
indietyp marked this conversation as resolved.

tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
Expand Down
30 changes: 19 additions & 11 deletions libs/@blockprotocol/type-system/rust/docs/dependency-diagram.mmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading