mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 04:00:01 +00:00
Merge pull request #46 from Magnus167/bechmark-edits
Replace benchmark artifact handling and update buggy benchmark
This commit is contained in:
commit
349ae52629
6
.github/workflows/docs-and-testcov.yml
vendored
6
.github/workflows/docs-and-testcov.yml
vendored
@ -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
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user