Skip to content

Commit

Permalink
Updated benchmark report.
Browse files Browse the repository at this point in the history
  • Loading branch information
simphotonics committed Sep 18, 2023
1 parent 5a4ce9f commit 88ef3ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 50 deletions.
54 changes: 5 additions & 49 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,15 @@
To run the benchmarks, navigate to the package root in your local copy of [`directed_graph`][directed_graph] and
use the command:
```Console
$ pub run benchmark
$ pub run benchmark_runner
```
A sample benchmark output is listed below:
```Dart
DONE ./benchmark/bin/weighted_directed_graph_benchmark.dart (3 s)
Manipulating edges:
✓ remove vertex l (6 us)
✓ sort edges (32 us)
✓ sort edges by weight (33 us)
Topology:
✓ isAcyclic (20 us)
✓ topologicalOrdering (31 us)
✓ sortedTopologicalOrdering (41 us)
✓ transitiveClosure (244 us)
✓ cycleVertex (19 us)
✓ cycle (19 us)
✓ localSources (42 us)
✓ stronglyConnectedComponents (40 us)
✓ shortestPaths (10 us)
Selecting path by weight:
✓ lightest path a -> g (34 us)
✓ heaviest path a -> g (34 us)
A sample benchmark output is shown below:

DONE ./benchmark/bin/graph_crawler_benchmark.dart (1 s)
Topology:
✓ path (20 us)
✓ paths (20 us)
✓ tree (11 us)
✓ mappedTree (18 us)
![Benchmark report](https://github.com/simphotonics/directed_graph/raw/main/images/benchmark_report.png)

DONE ./benchmark/bin/directed_graph_benchmark.dart (2 s)
Manipulating edges:
✓ remove vertex l (6 us)
✓ sort edges (15 us)
Topology:
✓ isAcyclic (17 us)
✓ topologicalOrdering (25 us)
✓ sortedTopologicalOrdering (38 us)
✓ transitiveClosure (75 us)
✓ cycleVertex (15 us)
✓ cycle (15 us)
✓ localSources (38 us)
✓ stronglyConnectedComponents (36 us)
✓ shortestPaths (8 us)
Benchmark suites: 3 passed, 3 total
Benchmarks: 29 passed, 29 total
Time: 7 s
Ran all benchmark suites.
```

The report above was generated on a PC with an Intel Core i5-6260U processor and 32GB of memory
using the package [`benchmark`][benchmark].
using the package [`benchmark_runner`][benchmark_runner].



Expand All @@ -69,7 +25,7 @@ using the package [`benchmark`][benchmark].
Please file feature requests and bugs at the [issue tracker].


[benchmark]: https://pub.dev/packages/benchmark
[benchmark_runner]: https://pub.dev/packages/benchmark_runner

[issue tracker]: https://github.com/simphotonics/directed_graph/issues

Expand Down
Binary file added images/benchmark_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion lib/directed_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/// * retrieve cycles,
/// * retrieve a list of vertices in topological order.
export 'src/extensions/graph_utils.dart';
export 'src/extensions/sort.dart';
export 'src/graphs/bidirected_graph.dart';
export 'src/graphs/directed_graph.dart';
Expand Down

0 comments on commit 88ef3ab

Please sign in to comment.