Skip to content

Commit

Permalink
🧪 fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaillon committed Jan 8, 2025
1 parent 4067939 commit 85d47d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
10 changes: 3 additions & 7 deletions tests.d/1009-lib-benchmark/00.tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ source benchmark
source io

function test_function_1() {
io::sleep 0.01
:
}

function test_function_2() {
io::sleep 0.05
:
}

function test_function_3() {
io::sleep 0.03
:
}

function test_benchmark::run() {
declare -f test_function_1 test_function_2 test_function_3

echo
echo "→ benchmark::run test_function_1 '' 1"
benchmark::run test_function_1 '' 1

echo
echo "→ benchmark::run test_function_1 test_function_2,test_function_3 3 5"
benchmark::run test_function_1 test_function_2,test_function_3 3 5
Expand Down
17 changes: 3 additions & 14 deletions tests.d/1009-lib-benchmark/results.approved.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,18 @@ Exit code: `0`
```plaintext
test_function_1 ()
{
io::sleep 0.01
:
}
test_function_2 ()
{
io::sleep 0.05
:
}
test_function_3 ()
{
io::sleep 0.03
:
}
→ benchmark::run test_function_1 '' 1
→ benchmark::run test_function_1 test_function_2,test_function_3 3 5
INFO Running the baseline ⌜test_function_X⌝ for ⌜Xs⌝.
INFO The baseline ⌜test_function_X⌝ was initially run ⌜X⌝ times in ⌜X.Xs⌝.
INFO The function ⌜test_function_X⌝ was run ⌜X⌝ times in ⌜X.Xs⌝.
SUCCESS Benchmark results from fastest to slowest:
Function name ░ Average time ░ Compared to fastest
░b
test_function_X ░ X.Xs Xµs ░ N/A
INFO Running the baseline ⌜test_function_X⌝ for ⌜Xs⌝.
INFO The baseline ⌜test_function_X⌝ was initially run ⌜X⌝ times in ⌜X.Xs⌝.
INFO The function ⌜test_function_X⌝ was run ⌜X⌝ times in ⌜X.Xs⌝.
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.474
0.28.478

0 comments on commit 85d47d2

Please sign in to comment.