From 9279939c3081d619f61b9ce81209739a6fb1a0fe Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 7 Jun 2025 13:09:32 +0100 Subject: [PATCH 1/2] Replace BDatesList and BDateFreq with DatesList and DateFreq in benchmarks --- benches/benchmarks.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 93cf8cd..e8954c8 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -5,7 +5,7 @@ use criterion::{criterion_group, criterion_main, Criterion}; use rustframe::{ frame::{Frame, RowIndex}, matrix::{BoolMatrix, Matrix, SeriesOps}, - utils::{BDatesList, BDateFreq}, + utils::{DateFreq, DatesList}, }; use std::time::Duration; @@ -146,7 +146,7 @@ fn matrix_operations_benchmark(c: &mut Criterion, sizes: &[usize]) { fn generate_frame(size: usize) -> Frame { let data: Vec = (0..size * size).map(|x| x as f64).collect(); let dates: Vec = - BDatesList::from_n_periods("2000-01-01".to_string(), BDateFreq::Daily, size) + DatesList::from_n_periods("2000-01-01".to_string(), DateFreq::Daily, size) .unwrap() .list() .unwrap(); From 7b33b5b58286c17fb556f758d0a5aaead0ebd211 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 7 Jun 2025 13:17:06 +0100 Subject: [PATCH 2/2] Handle missing benchmark artifact by creating an HTML placeholder instead of failing the workflow --- .github/workflows/docs-and-testcov.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index c946b9b..68bd58c 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -112,14 +112,14 @@ jobs: if [ -z "$artifact_url" ]; then echo "No benchmark artifact found!" - exit 1 + mkdir -p benchmark-report + echo 'No Benchmarks

No benchmarks available

' > benchmark-report/index.html + exit 0 fi curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \ "$artifact_url" -o benchmark-report.zip - - # Print all files in the current directory echo "Files in the current directory:" ls -al