Skip to content

Commit

Permalink
add jump det comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidNiezgodka committed Jan 22, 2024
1 parent 8f60099 commit f5e9b4c
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 158 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- missing_eval

jobs:
test:
Expand All @@ -22,7 +23,7 @@ jobs:
sparse-checkout-cone-mode: false
path: 'bench_data'

- run: tree
# - run: tree

- name: Evaluate benchmark
uses: ./
Expand All @@ -33,26 +34,23 @@ jobs:
file_with_bench_data: data.json
folder_with_current_benchmark_results: resultsFolder
bench_group_name: "MongoDB Benchmark"
evaluation_method: "threshold"
threshold_values: 2500,700,50000,5000,30000
comparison_operators: tolerance,tolerance,tolerance,tolerance,tolerance
comparison_margins: 10,10,10,10,10
result_files_merge_strategy_for_each_metric: "sum, average, average, average, average"
evaluation_method: "jump_detection"
jump_detection_thresholds: "10, 10, 10, 10, 10"
save_curr_bench_res: true
github_token: ${{ secrets.GH_TOKEN }}
github_context: ${{ toJson(github) }}

- name: Commit files
working-directory: ./bench_data
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Add changes"
git push origin bench_data
- name: Check output and fail if needed
if: steps.eval.outputs.should_fail == 'true'
run: |
echo "Failing as indicated by evaluation action"
exit 1
# - name: Commit files
# working-directory: ./bench_data
# run: |
# git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git commit -a -m "Add changes"
# git push origin bench_data
#
# - name: Check output and fail if needed
# if: steps.eval.outputs.should_fail == 'true'
# run: |
# echo "Failing as indicated by evaluation action"
# exit 1

90 changes: 79 additions & 11 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 0 additions & 39 deletions resultsFolder/result_wg-medium2.json

This file was deleted.

39 changes: 0 additions & 39 deletions resultsFolder/result_wg-medium3.json

This file was deleted.

39 changes: 0 additions & 39 deletions resultsFolder/result_wg-medium4.json

This file was deleted.

1 change: 0 additions & 1 deletion src/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module.exports.createCurrBench = function (config) {
}).filter(result => result !== null);

let commit;
// if config.eventName === schedule, then we will not have
if (config.eventName === 'schedule') {
core.info('The workflow was triggered by a scheduled event.');
commit = getCommitReplacementWhenTriggeredByScheduledEvent(config.runId);
Expand Down
6 changes: 0 additions & 6 deletions src/bench_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports.addCompleteBenchmarkToFile = async (
core.debug(`Reading file at ${pathToPreviousDataFile}`)
try {
const data = await fs.readFile(pathToPreviousDataFile, 'utf8')
//core.debug('Read file: ' + data) // -> can be very long...
jsonData = JSON.parse(data)
} catch (err) {
core.debug(
Expand Down Expand Up @@ -229,13 +228,9 @@ module.exports.getBenchFromWeekAgo = function (
);

let benchmarks = data.entries[benchmarkGroupToCompare];
// Print the amount of benchmarks

let closestBenchmark = null;
let smallestDifference = Infinity;



benchmarks.forEach(benchmark => {
let difference = Math.abs(now - benchmark.date - ONE_WEEK_IN_MS);
if (difference < smallestDifference) {
Expand Down Expand Up @@ -298,7 +293,6 @@ module.exports.getBenchmarkOfStableBranch = function (benchmarkGroupToCompare, f
folderWithBenchData, fileNameWithBenchData
);
let benchmarks = data.entries[benchmarkGroupToCompare];
// find benchmark with commit sha == latestBenchSha
let benchmark = benchmarks.find(benchmark => benchmark.commit.id === latestBenchSha);
core.debug(`Benchmark of stable branch: ${JSON.stringify(benchmark)}`);

Expand Down
Loading

1 comment on commit f5e9b4c

@DawidNiezgodka
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark results

Benchmark group: MongoDB Benchmark

The chosen evaluation method is jump_detection.
For each metric, there is the following condition:
The current value should not change more than X% (Max. ch in the table below) from the value measured for the previous benchmark.

Current Benchmark Previous Benchmark
Execution time: 0m 11s Execution time: 0m 11s
Parametrization: Parametrization:
- storageEngine: N/A - storageEngine: N/A
- logVerbosity: N/A - logVerbosity: N/A
- bindIp: 0.0.0.0 - bindIp: 0.0.0.0
- port: 27017 - port: 27017
Other Info: YCSB Parameters: workload=workloada, recordcount=200000, threads=32, Other Info: YCSB Parameters: workload=workloada, recordcount=200000, threads=32,

Results

| Metric | Curr: f5e9b4c | Prev: 8f60099 | Max. Jump | Was | Res |
|-|-|-|-|-|-|-|
| OVERALL Throughput | -75.08 ops/sec | NaN ops/sec | 10 | -75.08 | 🔴 |
| [READ], AverageLatency(us) | 0.81 us | NaN us | 10 | 0.81 | 🟢 |
| [READ], MaxLatency(us) | -25.52 us | NaN us | 10 | -25.52 | 🔴 |
| [UPDATE], AverageLatency(us) | 1.00 us | NaN us | 10 | 1.00 | 🟢 |
| [UPDATE], MaxLatency(us) | 17.72 us | NaN us | 10 | 17.72 | 🔴 |

Benchmark failed

The chosen failing condition was any.
At least one metric didn't pass the tests.

Please sign in to comment.