Merge pull request #46 from Magnus167/bechmark-edits

Replace benchmark artifact handling and update buggy benchmark
This commit is contained in:
Palash Tyagi 2025-06-07 13:23:23 +01:00 committed by GitHub
commit 349ae52629
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -112,14 +112,14 @@ jobs:
if [ -z "$artifact_url" ]; then if [ -z "$artifact_url" ]; then
echo "No benchmark artifact found!" echo "No benchmark artifact found!"
exit 1 mkdir -p benchmark-report
echo '<!DOCTYPE html><html><head><title>No Benchmarks</title></head><body><h1>No benchmarks available</h1></body></html>' > benchmark-report/index.html
exit 0
fi fi
curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \ curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \
"$artifact_url" -o benchmark-report.zip "$artifact_url" -o benchmark-report.zip
# Print all files in the current directory # Print all files in the current directory
echo "Files in the current directory:" echo "Files in the current directory:"
ls -al ls -al

View File

@ -5,7 +5,7 @@ use criterion::{criterion_group, criterion_main, Criterion};
use rustframe::{ use rustframe::{
frame::{Frame, RowIndex}, frame::{Frame, RowIndex},
matrix::{BoolMatrix, Matrix, SeriesOps}, matrix::{BoolMatrix, Matrix, SeriesOps},
utils::{BDatesList, BDateFreq}, utils::{DateFreq, DatesList},
}; };
use std::time::Duration; use std::time::Duration;
@ -146,7 +146,7 @@ fn matrix_operations_benchmark(c: &mut Criterion, sizes: &[usize]) {
fn generate_frame(size: usize) -> Frame<f64> { fn generate_frame(size: usize) -> Frame<f64> {
let data: Vec<f64> = (0..size * size).map(|x| x as f64).collect(); let data: Vec<f64> = (0..size * size).map(|x| x as f64).collect();
let dates: Vec<NaiveDate> = let dates: Vec<NaiveDate> =
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() .unwrap()
.list() .list()
.unwrap(); .unwrap();