-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bulk-running mode for TDBBenchmarkRunner to generate historic ben…
…chmark data. Works together with benchmark-action/github-action-benchmark#99. Revise state model of TDBBenchmark.
- Loading branch information
Showing
12 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ges/TraceDebuggerBenchmarks.package/TDBBenchmark.class/instance/hasCompletedOrTimedOut.st
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,4 @@ | ||
testing | ||
hasCompletedOrTimedOut | ||
|
||
^ result = #completed or: [result = #running] |
4 changes: 0 additions & 4 deletions
4
packages/TraceDebuggerBenchmarks.package/TDBBenchmark.class/instance/hasRun.st
This file was deleted.
Oops, something went wrong.
12 changes: 7 additions & 5 deletions
12
packages/TraceDebuggerBenchmarks.package/TDBBenchmark.class/instance/performBenchmark.st
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,12 +1,14 @@ | ||
private | ||
performBenchmark | ||
|
||
hasRun := false. | ||
result := #running. | ||
totalTime := nil. | ||
preparationTime := Duration zero. | ||
postparationTime := Duration zero. | ||
[self perform: selector. | ||
hasRun := true] | ||
[[self perform: selector. | ||
result := #completed] | ||
valueAndStoreTimeToRunWithoutGC: [:duration | | ||
totalTime := duration. | ||
timeToRun := totalTime - preparationTime - postparationTime]. | ||
timeToRun := totalTime - preparationTime - postparationTime]] | ||
on: Error, Warning, Halt | ||
do: [:ex | result := ex]. |
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
4 changes: 4 additions & 0 deletions
4
packages/TraceDebuggerBenchmarks.package/TDBBenchmarkRunner.class/class/newDefault.st
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,4 @@ | ||
instance creation | ||
newDefault | ||
|
||
^ self selector: self testSelector |
18 changes: 18 additions & 0 deletions
18
...s/TraceDebuggerBenchmarks.package/TDBBenchmarkRunner.class/class/runForVersionsHashes..st
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,18 @@ | ||
bulk running | ||
runForVersionsHashes: versionHashes | ||
"Run all benchmarks for each of the specified version hashes (aka commit SHAs) and export the results for each version in a separate file. You may check in these results into the github-action-benchmark- database for GitHub pages by passing these files to the run_local.ts script, see: https://github.com/benchmark-action/github-action-benchmark/pull/99" | ||
|
||
| versions workingCopy | | ||
workingCopy := (Smalltalk classNamed: #SquotWorkingCopy) registered | ||
detect: [:ea | ea name = #TraceDebugger]. | ||
versions := versionHashes collect: [:hash | workingCopy repository versionAt: hash]. | ||
|
||
Transcript openIfNone. | ||
versions | ||
do: [:version | | runner | | ||
workingCopy loadVersion: version interactive: false. | ||
runner := self newDefault | ||
resultsFilePath: ('benchmark-results-{1}.json' format: {version hexHash}); | ||
yourself. | ||
Transcript showln: 'Runner result:'; show: runner run] | ||
displayingProgress: [:version | 'Running benchmarks for {1}' format: {version}]. |
4 changes: 4 additions & 0 deletions
4
...ges/TraceDebuggerBenchmarks.package/TDBBenchmarkRunner.class/instance/resultsFilePath..st
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,4 @@ | ||
accessing | ||
resultsFilePath: aString | ||
|
||
resultsFilePath := aString |
3 changes: 2 additions & 1 deletion
3
...ages/TraceDebuggerBenchmarks.package/TDBBenchmarkRunner.class/instance/resultsFilePath.st
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,5 @@ | ||
accessing | ||
resultsFilePath | ||
|
||
^ self configAt: #TDBBenchmarkResultsPath ifAbsent: ['TDBBenchmarkResults.json'] | ||
^ resultsFilePath ifNil: | ||
[self configAt: #TDBBenchmarkResultsPath ifAbsent: ['TDBBenchmarkResults.json']] |
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