[riot-notifications] [RIOT-OS/RIOT] tests/periph_spi: Add thread runtime stats (#14087)

benpicco notifications at github.com
Mon May 18 22:59:02 CEST 2020


@benpicco commented on this pull request.



> +    printf("\t\t%i\t%i\n", (int)(stop - start),
+           (int)xtimer_diff(sched_stop, sched_start).ticks32);

I know `%"PRIu32"` is ugly and just casting to `int` is much easier, but on ATmega this will print

```
2020-05-18 22:52:35,723 # ### Running some benchmarks, all values in [us] ###
2020-05-18 22:52:35,757 # ### Test				Transfer time	user time
2020-05-18 22:52:35,757 # 
2020-05-18 22:52:35,825 #  1 - write 1000 times 1 byte:			24776	6206
2020-05-18 22:52:35,900 #  2 - write 1000 times 2 byte:			31272	7830
2020-05-18 22:52:36,939 #  3 - write 1000 times 100 byte:		10272	-13803
2020-05-18 22:52:37,041 #  4 - write 1000 times 1 byte to register:	-19136	11613
2020-05-18 22:52:37,150 #  5 - write 1000 times 2 byte to register:	-11080	13627
2020-05-18 22:52:38,224 #  6 - write 1000 times 100 byte to register:	-32052	-8000
2020-05-18 22:52:38,297 #  7 - read 1000 times 2 byte:			31396	7862
2020-05-18 22:52:39,329 #  8 - read 1000 times 100 byte:			4200	-15322
2020-05-18 22:52:39,441 #  9 - read 1000 times 2 byte from register:	-11076	13628
2020-05-18 22:52:40,508 # 10 - read 1000 times 100 byte from register:	27344	-9535
2020-05-18 22:52:40,584 # 11 - transfer 1000 times 2 byte:		31400	7862
2020-05-18 22:52:41,633 # 12 - transfer 1000 times 100 byte:		16612	-12219
2020-05-18 22:52:41,746 # 13 - transfer 1000 times 2 byte to register:	-10948	13659
2020-05-18 22:52:42,829 # 14 - transfer 1000 times 100 byte to register:	-25816	-6441
2020-05-18 22:52:43,859 # -- - SUM:					1628	6359324
2020-05-18 22:52:43,859 # 
2020-05-18 22:52:43,886 # ### All runs complete ###
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14087#pullrequestreview-413934460
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200518/b7edd2b4/attachment.htm>


More information about the notifications mailing list