Compare commits

...

5 Commits

4 changed files with 16 additions and 4 deletions

View File

@ -247,7 +247,8 @@ def generate_html_table_with_links(
{html_doc_end}""" {html_doc_end}"""
all_sizes = sorted( all_sizes = sorted(
list(set(size for test_data in results.values() for size in test_data.keys())) list(set(size for test_data in results.values() for size in test_data.keys())),
key=(lambda x: int(x.split("x")[0])),
) )
all_test_names = sorted(list(results.keys())) all_test_names = sorted(list(results.keys()))

View File

@ -36,6 +36,16 @@ jobs:
- name: Run benchmarks - name: Run benchmarks
run: cargo bench --features bench run: cargo bench --features bench
- name: Generate custom benchmark reports
run: |
if [ -d ./target/criterion ]; then
echo "Found benchmark reports, generating custom report..."
else
echo "No benchmark reports found, skipping custom report generation."
exit 1
fi
python .github/scripts/custom_benchmark_report.py
- name: Upload benchmark reports - name: Upload benchmark reports
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:

View File

@ -236,8 +236,8 @@ fn run_benchmarks_large(c: &mut Criterion) {
fn config_small_arrays() -> Criterion { fn config_small_arrays() -> Criterion {
Criterion::default() Criterion::default()
.sample_size(500) .sample_size(500)
.measurement_time(Duration::from_millis(500)) .measurement_time(Duration::from_millis(100))
.warm_up_time(Duration::from_millis(50)) .warm_up_time(Duration::from_millis(5))
} }
fn config_medium_arrays() -> Criterion { fn config_medium_arrays() -> Criterion {
@ -254,6 +254,7 @@ fn config_large_arrays() -> Criterion {
.warm_up_time(Duration::from_millis(200)) .warm_up_time(Duration::from_millis(200))
} }
criterion_group!( criterion_group!(
name = benches_small_arrays; name = benches_small_arrays;
config = config_small_arrays(); config = config_small_arrays();

View File

@ -2,7 +2,7 @@
use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Index, IndexMut, Mul, Not, Sub}; use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Index, IndexMut, Mul, Not, Sub};
/// A columnmajor 2D matrix of `T` /// A columnmajor 2D matrix of `T`. Index as `Array(row, column)`.
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub struct Matrix<T> { pub struct Matrix<T> {
rows: usize, rows: usize,