Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Upgrade Rust toolchain to 1.84 #83

Merged
merged 9 commits into from
Mar 4, 2025
Merged
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
4 changes: 2 additions & 2 deletions .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.84.0

jobs:
build:
Expand All @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2

- name: Cache Cargo
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

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

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: 3165 (new)
heap_increase: 0 pages (new)
stable_memory_increase: 0 pages (new)

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

scope_2 (scope):
instructions: 787 (new)
instructions: 714 (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: 3165 (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: 913 (regressed by 14.12%)
heap_increase: 0 pages (improved by 100.00%)
stable_memory_increase: 0 pages (no change)

scope_2 (scope):
instructions: 787 (new)
instructions: 714 (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: 872 (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
3 changes: 2 additions & 1 deletion canbench-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ 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
12 changes: 6 additions & 6 deletions examples/btreemap_vs_hashmap/canbench_results.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
benches:
insert_users:
total:
instructions: 2570835903
instructions: 2554172078
heap_increase: 871
stable_memory_increase: 0
scopes: {}
pre_upgrade_bench:
total:
instructions: 743977526
instructions: 807868600
heap_increase: 519
stable_memory_increase: 184
scopes:
serialize_state:
instructions: 729045047
instructions: 792936247
heap_increase: 519
stable_memory_increase: 0
writing_to_stable_memory:
instructions: 14930540
instructions: 14930479
heap_increase: 0
stable_memory_increase: 184
remove_users:
total:
instructions: 2072135114
instructions: 2109060905
heap_increase: 0
stable_memory_increase: 0
scopes: {}
version: 0.1.5
version: 0.1.9
6 changes: 3 additions & 3 deletions examples/fibonacci/canbench_results.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
benches:
fibonacci_20:
total:
instructions: 2224
instructions: 2187
heap_increase: 0
stable_memory_increase: 0
scopes: {}
fibonacci_45:
total:
instructions: 3011
instructions: 2925
heap_increase: 0
stable_memory_increase: 0
scopes: {}
version: 0.1.1
version: 0.1.9
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.84.0" # NOTE: remember to update CI as well.
targets = ["wasm32-unknown-unknown"]
11 changes: 5 additions & 6 deletions tests/init_arg/canbench_results.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# The results in this file are artificial and are designed to trigger
# certain scenarios.
benches:
state_check:
total:
heap_delta: 0
instructions: 804
stable_memory_delta: 0
version: 0.1.0
instructions: 872
heap_increase: 0
stable_memory_increase: 0
scopes: {}
version: 0.1.9
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