Sha256: 604804ba61b583976a5479b9d9b0019ef0e6ee301bc5527827ef73f857336993

Contents?: true

Size: 1.4 KB

Versions: 5

Compression:

Stored size: 1.4 KB

Contents

---
layout: page
title: Performance Analysis
permalink: /performance/
---

Besides the tests suite, it is also possible to run performance comparisons between implementation variations of the same data structures.

#### What are we benchmarking?

To aid in our quest of benchmarking the ruby code, we use [benchmark-ips](https://github.com/evanphx/benchmark-ips) to get data about the number of iteration per seconds for a given block of code.

#### Graph results

To help with the results visualization and spotting patterns on the data, the benchmark classes generate graphs results using [Gruff](https://github.com/topfunky/gruff).

#### BenchmarkHelper

All benchkmark comparisons subclass `BenchmarkHelper` to reuse some utility methods and string helpers. At the same time it brings a common convention about to proceed for the performance testing. You can find the existing benchmark implementations at [https://github.com/renehernandez/data_structures_101/tree/master/perf](https://github.com/renehernandez/data_structures_101/tree/master/perf).

#### Rake task for performance

Since the performance tests are not rspec-based, they cannot be run through the rspec cli. Instead, there is a set of rake tasks to run our performance tests. By loading [perf.rake](https://github.com/renehernandez/data_structures_101/blob/master/tasks/perf.rake) on the rake file we can run and generate the corresponding graphs for the analyses.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
data_structures_101-0.3.1 docs/pages/performance.md
data_structures_101-0.3.0 docs/pages/performance.md
data_structures_101-0.2.10 docs/pages/performance.md
data_structures_101-0.2.9 docs/pages/performance.md
data_structures_101-0.2.8 docs/pages/performance.md