Skip to content
This repository was archived by the owner on Nov 19, 2019. It is now read-only.
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
27 changes: 26 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@ jobs:
- maven_command_with_cache:
command: mvn deploy

benchmark:
executor: main_exe
steps:
- maven_command_with_cache:
command: mvn package
- run:
name: Run benchmarks
command: sh scriptTime.sh
- run:
command: |
mkdir -p benchmark
mv benchmark_report benchmark/
- store_artifacts:
path: benchmark
destination: benchmark
workflows:
main_flow:
jobs:
Expand All @@ -189,4 +204,14 @@ workflows:
only:
- master
requires:
- package
- package
master-scheduled-benchmark:
triggers:
- schedule:
cron: "0 12 * * *"
filters:
branches:
only:
- master
jobs:
- benchmark
22 changes: 22 additions & 0 deletions scriptBench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

echo "Benchmark report" >> benchmark_report
echo "--------------------" >> benchmark_report
i="0"
total=0
while [ $i -lt 5 ]
do
start=`date +%s`
mvn test --quiet
end=`date +%s`
runtime=$((end-start))
total=$((total+runtime))
i=$(($i + 1))
echo " - Time spent job $i: $runtime" >> benchmark_report
done

mean=$((total/5))
echo "--------------------" >> benchmark_report
echo "Total time spent ($i jobs): $total" >> benchmark_report
echo "Time spent per job: $mean" >> benchmark_report
echo "--------------------" >> benchmark_report