forked from airhorns/batman
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Make Set memory usage its own report
- Loading branch information
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
helpers = require 'sha_summarizer' | ||
qs = (length) -> ('?' for i in [0...length]).join(', ') | ||
|
||
header "Hash Speed - lower is better" | ||
|
||
keys = ['hash performance: object-key setting', 'hash performance: object-key retrieval', 'hash performance: string-key setting', 'hash performance: string-key retrieval'] | ||
shas = helpers.getAvailableShas(keys) | ||
|
||
barchart helpers.reportKeysAcrossShas(keys, shas) | ||
header "Setting Speed" | ||
barchart helpers.reportKeysAcrossShas([keys[1], keys[3]], shas) | ||
|
||
header "Getting Speed" | ||
barchart helpers.reportKeysAcrossShas([keys[0], keys[2]], shas) | ||
|
2 changes: 1 addition & 1 deletion
2
tests/prof/reports/Hash and Set/Hash and Set Memory Usage.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
header "Hash & Set Memory Usage" | ||
header "Hash Memory Usage" | ||
|
||
qs = (length) -> | ||
x = ['?'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
helpers = require 'sha_summarizer' | ||
|
||
header "Set Memory Usage" | ||
|
||
keys = ["set memory usage", "simple set memory usage"] | ||
klass = Resultset.build 'name', 'value', -> | ||
@push ["Set", "set memory usage"] | ||
@push ["SimpleSet", "simple set memory usage"] | ||
|
||
param "key", select(klass), label: "Set class:", updateOnChange: true | ||
|
||
shas = helpers.getAvailableShas(keys) | ||
|
||
linechart helpers.summarizeShasForKey(shas, params.key) |