From e49be5acfe3960119ec51382225b30fabe40d3f6 Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Thu, 12 Sep 2024 11:44:53 +0200 Subject: [PATCH 1/4] chore: update rust from 1.75 to 1.81 --- .github/workflows/ci.yml | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1274bdb..568b452f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: [pull_request] env: - RUST_VERSION: 1.75.0 + RUST_VERSION: 1.81.0 jobs: build: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b30063f1..5c6d171a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -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"] From 565eceb3deca62318918aa6f6f7f9a573f04437d Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Thu, 12 Sep 2024 11:48:55 +0200 Subject: [PATCH 2/4] . --- canbench-rs/src/lib.rs | 2 +- tests/init_arg/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/canbench-rs/src/lib.rs b/canbench-rs/src/lib.rs index fce410a7..4666ed2b 100644 --- a/canbench-rs/src/lib.rs +++ b/canbench-rs/src/lib.rs @@ -395,7 +395,7 @@ use std::cell::RefCell; use std::collections::BTreeMap; thread_local! { - static SCOPES: RefCell> = RefCell::new(BTreeMap::new()); + static SCOPES: RefCell> = const { RefCell::new(BTreeMap::new()) }; } /// The results of a benchmark. diff --git a/tests/init_arg/src/main.rs b/tests/init_arg/src/main.rs index 4fba7bdb..5f66fde2 100644 --- a/tests/init_arg/src/main.rs +++ b/tests/init_arg/src/main.rs @@ -2,7 +2,7 @@ use canbench_rs::bench; use std::cell::RefCell; thread_local! { - static STATE: RefCell = RefCell::new(String::new()); + static STATE: RefCell = const { RefCell::new(String::new()) }; } // A benchmark that prints the state. #[bench] From 319cac0cba58cdd562c4a606822a19851d6b8f04 Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Wed, 18 Sep 2024 13:21:14 +0200 Subject: [PATCH 3/4] . --- canbench-bin/tests/tests.rs | 16 ++++++++-------- tests/init_arg/canbench_results.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/canbench-bin/tests/tests.rs b/canbench-bin/tests/tests.rs index 63f46078..93626d95 100644 --- a/canbench-bin/tests/tests.rs +++ b/canbench-bin/tests/tests.rs @@ -233,17 +233,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) @@ -265,17 +265,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) @@ -309,7 +309,7 @@ fn benchmark_works_with_init_args() { Benchmark: state_check total: - instructions: 804 (no change) + instructions: 930 (no change) heap_increase: 0 pages (no change) stable_memory_increase: 0 pages (no change) @@ -332,7 +332,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) diff --git a/tests/init_arg/canbench_results.yml b/tests/init_arg/canbench_results.yml index 49a50a7e..f69bfc8d 100644 --- a/tests/init_arg/canbench_results.yml +++ b/tests/init_arg/canbench_results.yml @@ -4,6 +4,6 @@ benches: state_check: total: heap_delta: 0 - instructions: 804 + instructions: 930 stable_memory_delta: 0 version: 0.1.0 From 7b807dc3c31edec5f0dc98d2904f52e7e152b1eb Mon Sep 17 00:00:00 2001 From: Dimitris Sarlis Date: Fri, 25 Oct 2024 10:38:48 +0000 Subject: [PATCH 4/4] Fix test --- canbench-bin/tests/tests.rs | 2 +- tests/init_arg/canbench_results.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/canbench-bin/tests/tests.rs b/canbench-bin/tests/tests.rs index 305c17a2..eb2d598e 100644 --- a/canbench-bin/tests/tests.rs +++ b/canbench-bin/tests/tests.rs @@ -355,7 +355,7 @@ fn benchmark_works_with_init_args() { Benchmark: state_check total: - instructions: 930 (no change) + instructions: 867 (no change) heap_increase: 0 pages (no change) stable_memory_increase: 0 pages (no change) diff --git a/tests/init_arg/canbench_results.yml b/tests/init_arg/canbench_results.yml index f69bfc8d..2e45d97a 100644 --- a/tests/init_arg/canbench_results.yml +++ b/tests/init_arg/canbench_results.yml @@ -4,6 +4,6 @@ benches: state_check: total: heap_delta: 0 - instructions: 930 + instructions: 867 stable_memory_delta: 0 version: 0.1.0