Skip to content

Commit

Permalink
Update graph presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
phillord committed Jun 21, 2024
1 parent e43441f commit 492d6af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ Cargo.lock
.vscode/

# Mac OS X
.DS_Store
.DS_Store
/flamegraph.svg
/perf.data
/perf.data.old
5 changes: 2 additions & 3 deletions benches/io.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use criterion::{criterion_group, BenchmarkId, Criterion, Throughput};
use criterion::{criterion_group, AxisScale, BenchmarkId, Criterion, PlotConfiguration};
use std::fs::File;
use std::io::BufReader;
use std::time::Duration;

fn io_read(c: &mut Criterion) {
let mut group = c.benchmark_group("io_read");
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));

for n in [10, 100, 1_000, 2500, 5000, 10_000].iter() {
group.throughput(Throughput::Elements(*n as u64));

group.bench_with_input(BenchmarkId::new("owl_io_read", n), n, |b, &n| {
b.iter(|| {
let f = File::open(format!("benches/ont/o{}.owl", n)).ok().unwrap();
Expand Down
10 changes: 5 additions & 5 deletions benches/model.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::Cursor;
use std::rc::Rc;

use criterion::{criterion_group, BenchmarkId, Criterion, Throughput};
use criterion::{criterion_group, AxisScale, BenchmarkId, Criterion, PlotConfiguration};

use horned_owl::io::rdf::reader::RDFOntology;
use horned_owl::model::*;
Expand All @@ -26,9 +26,9 @@ fn create_many_classes(i: isize) {
// We start by testing the basic ontology model
fn classes(c: &mut Criterion) {
let mut group = c.benchmark_group("classes");
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));

for n in [100, 1_000, 10_000, 100_000].iter() {
group.throughput(Throughput::Elements(*n as u64));
group.bench_with_input(BenchmarkId::from_parameter(n), n, |b, &n| {
b.iter(|| create_many_classes(n));
});
Expand Down Expand Up @@ -79,9 +79,9 @@ fn create_tree_0<A: ForIRI, O: MutableOntology<A>>(
// Now test to see what impact the pointer and caching of strings has
fn tree(c: &mut Criterion) {
let mut group = c.benchmark_group("tree");
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));

for n in [100, 1_000, 10_000, 100_000].iter() {
group.throughput(Throughput::Elements(*n as u64));
group.bench_with_input(BenchmarkId::new("Rc", n), n, |b, &n| {
b.iter(|| {
let b = Build::new_rc();
Expand Down Expand Up @@ -111,9 +111,9 @@ fn tree(c: &mut Criterion) {
// Now test to see the impact of the pointers in indexes have
fn set_index_tree(c: &mut Criterion) {
let mut group = c.benchmark_group("set_index_tree");
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));

for n in [100, 1_000, 10_000, 100_000].iter() {
group.throughput(Throughput::Elements(*n as u64));
group.bench_with_input(BenchmarkId::new("SetOntology", n), n, |b, &n| {
b.iter(|| {
let b = Build::new_rc();
Expand Down Expand Up @@ -143,9 +143,9 @@ fn set_index_tree(c: &mut Criterion) {
// Test all of the different indexes
fn multi_index_tree(c: &mut Criterion) {
let mut group = c.benchmark_group("multi_index_tree");
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));

for n in [100, 1_000, 10_000, 50_000, 100_000].iter() {
group.throughput(Throughput::Elements(*n as u64));
group.bench_with_input(BenchmarkId::new("SetOntology", n), n, |b, &n| {
b.iter(|| {
let b = Build::new_rc();
Expand Down

0 comments on commit 492d6af

Please sign in to comment.