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

benpicco notifications at github.com
Tue May 19 11:40:20 CEST 2020


btw.: I also had to apply this patch to get the columns aligned

```patch
--- a/tests/periph_spi/main.c
+++ b/tests/periph_spi/main.c
@@ -392,7 +392,7 @@ int cmd_bench(int argc, char **argv)
     stop = xtimer_now_usec();
     sched_stop = _sched_ticks();
     printf(" 8 - read %i times %i byte:", BENCH_REDOS, BENCH_LARGE);
-    printf("\t\t\t%"PRIu32"\t%"PRIu32"\n", (stop - start),
+    printf("\t\t%"PRIu32"\t%"PRIu32"\n", (stop - start),
            xtimer_diff(sched_stop, sched_start).ticks32);
     sum += (stop - start);
     sched_sum += xtimer_usec_from_ticks(xtimer_diff(sched_stop,
@@ -488,7 +488,7 @@ int cmd_bench(int argc, char **argv)
     stop = xtimer_now_usec();
     sched_stop = _sched_ticks();
     printf("14 - transfer %i times %i byte to register:", BENCH_REDOS, BENCH_LARGE);
-    printf("\t%"PRIu32"\t%"PRIu32"\n", (stop - start),
+    printf("%"PRIu32"\t%"PRIu32"\n", (stop - start),
            xtimer_diff(sched_stop, sched_start).ticks32);
     sum += (stop - start);
     sched_sum += xtimer_usec_from_ticks(xtimer_diff(sched_stop,
```

```
2020-05-19 11:39:10,856 # ### Running some benchmarks, all values in [us] ###
2020-05-19 11:39:10,889 # ### Test				Transfer time	user time
2020-05-19 11:39:10,890 # 
2020-05-19 11:39:10,966 #  1 - write 1000 times 1 byte:			32776	8206
2020-05-19 11:39:11,057 #  2 - write 1000 times 2 byte:			47268	11829
2020-05-19 11:39:12,899 #  3 - write 1000 times 100 byte:		1793572	448405
2020-05-19 11:39:13,016 #  4 - write 1000 times 1 byte to register:	62328	15595
2020-05-19 11:39:13,148 #  5 - write 1000 times 2 byte to register:	78400	19612
2020-05-19 11:39:15,033 #  6 - write 1000 times 100 byte to register:	1824784	456209
2020-05-19 11:39:15,123 #  7 - read 1000 times 2 byte:			47328	11846
2020-05-19 11:39:16,957 #  8 - read 1000 times 100 byte:		1787508	446889
2020-05-19 11:39:17,091 #  9 - read 1000 times 2 byte from register:	78464	19628
2020-05-19 11:39:18,970 # 10 - read 1000 times 100 byte from register:	1818760	454702
2020-05-19 11:39:19,063 # 11 - transfer 1000 times 2 byte:		47400	11862
2020-05-19 11:39:20,914 # 12 - transfer 1000 times 100 byte:		1799880	449982
2020-05-19 11:39:21,050 # 13 - transfer 1000 times 2 byte to register:	78524	19643
2020-05-19 11:39:22,943 # 14 - transfer 1000 times 100 byte to register:1831076	457782
2020-05-19 11:39:23,973 # -- - SUM:					11328068	11328760
2020-05-19 11:39:24,004 # 
2020-05-19 11:39:24,004 # ### 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#issuecomment-630709239
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200519/13abf521/attachment.htm>


More information about the notifications mailing list