Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,20 +340,24 @@ All backends must have the following functions:
- `inject(string)` Inject a (usually cached) string into the output; instering any delimiters as needed.
- `capture(&block)` Capture the output of the block (w/o any delimiters)

Benchmark
---------
`gnuplot` is required to run benchmark, to install:
- `brew install gnuplot` (MacOS)
Performance Benchmarks
----------------------

`yajl` is required to install a development dependency [`wankel`](https://github.com/malomalo/wankel), to install:
- `brew install yajl` (MacOS)
[Gnuplot](http://www.gnuplot.info) and [YAJL](http://lloyd.github.io/yajl/) are
required to run the benchmarks. To install:

To run benchmark: `bundle exec rake performance`
- `brew install gnuplot yajl` (MacOS)

To run the benchmarks run: `bundle exec rake performance`

This will produce 2 graph images on in folders
- `performance/dirk`
- `performance/rolftimmermans`

The reports below were generated on macOS 10.14.6 Mac mini with a 3.2 Ghz Intel Core i7:

<img src="performance/dirk/report.png" width="480" alt="dirk"><img src="performance/rolftimmermans/report.png" width="480" alt="rolftimmermans">

Special Thanks & Contributors
-----------------------------

Expand Down
17 changes: 5 additions & 12 deletions performance/dirk/rabl/oj.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@ def self.cache
end
end

VIEW_PATH = File.expand_path("../performance/dirk/rabl/views/", __FILE__)
SOURCE = File.read(File.join(VIEW_PATH, "template.rabl"))

# Fill the cache
Rabl.render(
nil,
"template",
view_path: File.expand_path("../performance/dirk/rabl/views/", __FILE__),
format: :json,
)
Rabl::Renderer.new(SOURCE, nil, {format: :json}).render

# Everthing before this is run once initially, after is the test
__SETUP__

Rabl.render(
nil,
"template",
view_path: File.expand_path("../performance/dirk/rabl/views/", __FILE__),
format: :json,
)
Rabl::Renderer.new(SOURCE, nil, {format: :json}).render
Binary file added performance/dirk/report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added performance/rolftimmermans/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 turbostreamer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'analyzer'
spec.add_development_dependency 'jbuilder'
spec.add_development_dependency 'rabl'
# For running benchmark
spec.add_development_dependency 'multi_json'
# spec.add_development_dependency 'sdoc', '~> 0.4'
# spec.add_development_dependency 'sdoc-templates-42floors', '~> 0.3'
Expand Down