RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

sys/benchmark: use turo

Open kaspar030 opened this issue 4 years ago • 19 comments

Contribution description

This changes sys/benchmark to use turo.

This enables the results to be collected by CI along with the other metrics.

For seamless use, sys/benchmark depends on the json output if no other turo output is selected.

The only users (tests/bench_runtime_coreapis and tests/periph_gpio) have their makefiles adopted to allow choosing the output format.

Testing procedure

Issues/PRs references

Currently depends on https://github.com/RIOT-OS/RIOT/pull/17027.

kaspar030 avatar Oct 21 '21 12:10 kaspar030

HiL Test Results

PASS FAIL SKIP
11 51 0
  ❌ frdm-k22f (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-f091rc (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-g474re (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-f767zi (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-l152re (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-f207zg (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-l432kc (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ samr34-xpro (1 fail test)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis ❌ test fail
tests/periph_gpio ✅ pass
  ❌ saml10-xpro (1 fail test) (1 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis 😬 flash fail
  ❌ saml11-xpro (1 fail test) (1 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis 😬 flash fail
  ❌ samr30-xpro (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ samr21-xpro (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nrf52dk (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ remote-revb (1 fail test) (1 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis 😬 flash fail
  ❌ nucleo-l073rz (1 fail test)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis ❌ test fail
tests/periph_gpio ✅ pass
  ❌ slstk3401a (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-f411re (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ nucleo-f103rb (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ esp8266-esp-12x (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ esp32-wroom-32 (1 fail test)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis ❌ test fail
tests/periph_gpio ✅ pass
  ❌ z1 (1 fail test) (1 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis 😬 flash fail
  ❌ hifive1b (2 fail test)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ❌ test fail
  ❌ saml21-xpro (1 fail test)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis ❌ test fail
tests/periph_gpio ✅ pass
  ❌ stk3200 (1 fail test) (1 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ❌ test fail
  😬 nucleo-f303re (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis 😬 flash fail
tests/periph_gpio ✅ pass
  😬 arduino-mega2560 (2 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis 😬 flash fail
  😬 frdm-kw41z (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis 😬 flash fail
tests/periph_gpio ✅ pass
  😬 arduino-due (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis 😬 flash fail
tests/periph_gpio ✅ pass
  😬 slstk3400a (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis 😬 flash fail
tests/periph_gpio ✅ pass
  😬 frdm-k64f (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/bench_runtime_coreapis 😬 flash fail
tests/periph_gpio ✅ pass
  ✅ same54-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass

riot-hil-bot avatar Oct 21 '21 12:10 riot-hil-bot

HiL Test Results

ah, yes, the tests need to be adapted I guess.

kaspar030 avatar Oct 21 '21 13:10 kaspar030

Please rebase

fjmolinas avatar Oct 22 '21 08:10 fjmolinas

Please rebase

done, and I updated the test scripts of tests/periph_gpio and tests/bench_runtime_coreapis.

kaspar030 avatar Oct 22 '21 09:10 kaspar030

HiL Test Results

PASS FAIL SKIP
54 8 0
  ❌ slstk3401a (1 fail test)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio ❌ test fail
tests/bench_runtime_coreapis ✅ pass
  😬 nucleo-g474re (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ✅ pass
  😬 nucleo-f207zg (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ✅ pass
  😬 arduino-mega2560 (2 fail flash)
PASS FAIL SKIP
0 2 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis 😬 flash fail
  😬 samr34-xpro (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ✅ pass
  😬 frdm-k64f (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ✅ pass
  😬 same54-xpro (1 fail flash)
PASS FAIL SKIP
1 1 0
TEST RESULT
tests/periph_gpio 😬 flash fail
tests/bench_runtime_coreapis ✅ pass
  ✅ frdm-k22f
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-f091rc
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-f303re
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-f767zi
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-l152re
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-l432kc
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ saml10-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ saml11-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ samr30-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ samr21-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nrf52dk
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ remote-revb
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-l073rz
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-f411re
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ nucleo-f103rb
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ frdm-kw41z
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ esp8266-esp-12x
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ esp32-wroom-32
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ z1
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ hifive1b
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ arduino-due
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ slstk3400a
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ saml21-xpro
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass
  ✅ stk3200
PASS FAIL SKIP
2 0 0
TEST RESULT
tests/periph_gpio ✅ pass
tests/bench_runtime_coreapis ✅ pass

riot-hil-bot avatar Oct 22 '21 09:10 riot-hil-bot

BTW, the pr also changes some types, like, for us/call is now a float, and per_sec is now a full uint64_t. This prevents some printing issues, like:

             mutex_init():         1us  ---   0.000us per call  ---  3567587328 calls per sec

This is tests/benchmark_runtime_coreapis on nrf52840dk with "CFLAGS_OPT=-O3", which essentially turns mutex_init() into a nop. 1us for 1000000 runs (which is bogus to start with) is not 3567587328 calls per sec, but 1000000000000. This probably increases codesize of sys/benchmark's printing a bit.

kaspar030 avatar Oct 22 '21 09:10 kaspar030

nucleo-g474re (1 fail flash)

The output looks alright?

kaspar030 avatar Oct 22 '21 09:10 kaspar030

The only thing is the stk3200 that seems to look like the coms just messed up

MrKevinWeiss avatar Oct 22 '21 10:10 MrKevinWeiss

nucleo-g474re (1 fail flash)

The output looks alright?

Ya it does... I will have to look into this (and re-enter my spiralling depression).

As it stands, flash failures are an infrastructure things and we should not worry about that.

MrKevinWeiss avatar Oct 22 '21 10:10 MrKevinWeiss

Apart from the CI issues, does this look alright?

kaspar030 avatar Oct 22 '21 10:10 kaspar030

I also wouldn't mind if you piggy backed

diff --git a/sys/test_utils/result_output/txt/result_output_txt.c b/sys/test_utils/result_output/txt/result_output_txt.c
index ea4cddbed2..2bac84ff30 100644
--- a/sys/test_utils/result_output/txt/result_output_txt.c
+++ b/sys/test_utils/result_output/txt/result_output_txt.c
@@ -49,7 +49,7 @@ void turo_u64(turo_t *ctx, uint64_t val)
 void turo_float(turo_t *ctx, float val)
 {
     (void)ctx;
-    print_float(val, 8);
+    print_float(val, 7);
     print_str(" ");
 }

here

MrKevinWeiss avatar Oct 22 '21 10:10 MrKevinWeiss

I also wouldn't mind if you piggy backed

Better not, who knows if @benpicco wants to backport those...

https://github.com/RIOT-OS/RIOT/pull/17036

kaspar030 avatar Oct 22 '21 10:10 kaspar030

Damn, this seems to enlarge tests by >3.5k.

kaspar030 avatar Oct 22 '21 10:10 kaspar030

Damn, this seems to enlarge tests by >3.5k.

Too many whitespaces :zany_face:?

miri64 avatar Oct 22 '21 10:10 miri64

Is it because of the old import stdio and fmt problem?

MrKevinWeiss avatar Oct 22 '21 11:10 MrKevinWeiss

or the uint64_t and floats... I mean if they are needed than that is the cost.

MrKevinWeiss avatar Oct 22 '21 11:10 MrKevinWeiss

or the uint64_t and floats... I mean if they are needed than that is the cost.

yeah, I'll see if I can drop those changes. Probably it's the float division and printing that pulls in >3k.

kaspar030 avatar Oct 25 '21 19:10 kaspar030

#17035 hast the milestone for 2022.04 set, but depends on this one. Does it seem realistic for you to include this for the upcoming release?

OlegHahm avatar Mar 09 '22 12:03 OlegHahm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 05:09 stale[bot]

I'm not going to work on this anymore.

kaspar030 avatar Mar 01 '24 09:03 kaspar030