Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [pull_request]

env:
RUST_VERSION: 1.75.0
RUST_VERSION: 1.81.0

jobs:
build:
Expand Down
16 changes: 8 additions & 8 deletions canbench-bin/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,17 @@ fn reports_scopes_in_new_benchmark() {

Benchmark: bench_scope_new (new)
total:
instructions: 3411 (new)
instructions: 3579 (new)
heap_increase: 0 pages (new)
stable_memory_increase: 0 pages (new)

scope_1 (scope):
instructions: 1002 (new)
instructions: 1286 (new)
heap_increase: 0 pages (new)
stable_memory_increase: 0 pages (new)

scope_2 (scope):
instructions: 787 (new)
instructions: 740 (new)
heap_increase: 0 pages (new)
stable_memory_increase: 0 pages (new)

Expand Down Expand Up @@ -356,17 +356,17 @@ fn reports_scopes_in_existing_benchmark() {

Benchmark: bench_scope_exists
total:
instructions: 3411 (regressed from 0)
instructions: 3579 (regressed from 0)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)

scope_1 (scope):
instructions: 1002 (regressed by 25.25%)
instructions: 1286 (regressed by 60.75%)
heap_increase: 0 pages (improved by 100.00%)
stable_memory_increase: 0 pages (no change)

scope_2 (scope):
instructions: 787 (new)
instructions: 740 (new)
heap_increase: 0 pages (new)
stable_memory_increase: 0 pages (new)

Expand Down Expand Up @@ -400,7 +400,7 @@ fn benchmark_works_with_init_args() {

Benchmark: state_check
total:
instructions: 804 (no change)
instructions: 867 (no change)
heap_increase: 0 pages (no change)
stable_memory_increase: 0 pages (no change)

Expand All @@ -423,7 +423,7 @@ fn benchmark_stable_writes() {

Benchmark: write_stable_memory (new)
total:
instructions: 49.09 K (new)
instructions: 49.12 K (new)
heap_increase: 0 pages (new)
stable_memory_increase: 1 pages (new)

Expand Down
2 changes: 1 addition & 1 deletion canbench-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ use std::cell::RefCell;
use std::collections::BTreeMap;

thread_local! {
static SCOPES: RefCell<BTreeMap<&'static str, Measurement>> = RefCell::new(BTreeMap::new());
static SCOPES: RefCell<BTreeMap<&'static str, Measurement>> = const { RefCell::new(BTreeMap::new()) };
}

/// The results of a benchmark.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.75.0" # NOTE: remember to update CI as well.
channel = "1.81.0" # NOTE: remember to update CI as well.
targets = ["wasm32-unknown-unknown"]
2 changes: 1 addition & 1 deletion tests/init_arg/canbench_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ benches:
state_check:
total:
heap_delta: 0
instructions: 804
instructions: 867
stable_memory_delta: 0
version: 0.1.0
2 changes: 1 addition & 1 deletion tests/init_arg/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use canbench_rs::bench;
use std::cell::RefCell;

thread_local! {
static STATE: RefCell<String> = RefCell::new(String::new());
static STATE: RefCell<String> = const { RefCell::new(String::new()) };
}
// A benchmark that prints the state.
#[bench]
Expand Down