-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from countvajhula/nonlocal-benchmarks-starter
Organize performance benchmarks
- Loading branch information
Showing
20 changed files
with
552 additions
and
475 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
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
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
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
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
#!/usr/bin/env racket | ||
#lang racket/base | ||
|
||
(provide profile-load) | ||
|
||
(require pkg/require-latency | ||
racket/format) | ||
|
||
(define (profile-load module-name) | ||
(let ([name (~a "(require " module-name ")")] | ||
[ms (cdr (time-module-ms module-name))]) | ||
(displayln (~a name ": " ms " ms") | ||
(current-error-port)) | ||
(hash 'name name | ||
'unit "ms" | ||
'value ms))) |
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,41 @@ | ||
#!/usr/bin/env racket | ||
#lang cli | ||
|
||
(require racket/match | ||
racket/format | ||
relation | ||
qi | ||
(only-in "../util.rkt" | ||
only-if | ||
for/call | ||
write-csv | ||
format-output) | ||
"../regression.rkt" | ||
"loadlib.rkt") | ||
|
||
(help | ||
(usage | ||
(~a "Measure module load time, i.e. the time taken by (require qi)."))) | ||
|
||
(flag (output-format #:param [output-format ""] fmt) | ||
("-f" | ||
"--format" | ||
"Output format to use, either 'json' or 'csv'. If none is specified, no output is generated.") | ||
(output-format fmt)) | ||
|
||
(flag (regression-file #:param [regression-file #f] reg-file) | ||
("-r" "--regression" "'Before' data to compute regression against") | ||
(regression-file reg-file)) | ||
|
||
(program (main) | ||
(displayln "\nMeasuring module load time..." (current-error-port)) | ||
|
||
(let ([output (profile-load "qi")]) | ||
(if (regression-file) | ||
(let ([before (parse-benchmarks (parse-json-file (regression-file)))] | ||
[after (parse-benchmarks output)]) | ||
(format-output (compute-regression before after) | ||
(output-format))) | ||
(format-output output (output-format))))) | ||
|
||
(run main) |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.