Skip to content

Commit ef6e56e

Browse files
committed
Update benchmark results.
1 parent 8b6b310 commit ef6e56e

File tree

4 files changed

+40
-44
lines changed

4 files changed

+40
-44
lines changed

examples/SchedulerBenchmark/SchedulerBenchmark.ino

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,35 @@
2222
* SchedulerBenchmark: started
2323
* 1. Initiate scheduler and main task: 4 us
2424
* 2. Yield main task: 11.00 us
25-
* 3. Start a task: 16 us
25+
* 3. Start a task: 20 us
2626
* 4. Yield between two tasks: 22.89 us
2727
* 5. Delay 10 ms and check increments: 10028:381, 26.32 us
28-
* 6. Start 8 tasks: 140:8, 17.50 us
28+
* 6. Start 8 tasks: 148:8, 18.50 us
2929
* 7. Yield and check increments: 120:9, 13.33 us
30-
* 8. Delay 10 ms and check increments: 10084:747, 13.50 us
30+
* 8. Delay 10 ms and check increments: 10088:747, 13.50 us
3131
*
3232
* @section Results Arduino 1.6.7, Arduino Mega 2560
3333
* SchedulerBenchmark: started
3434
* 1. Initiate scheduler and main task: 4 us
3535
* 2. Yield main task: 12.64 us
36-
* 3. Start a task: 20 us
36+
* 3. Start a task: 24 us
3737
* 4. Yield between two tasks: 26.16 us
3838
* 5. Delay 10 ms and check increments: 10028:338, 29.67 us
39-
* 6. Start 47 tasks: 824:47, 17.53 us
40-
* 7. Yield and check increments: 660:48, 13.75 us
41-
* 8. Delay 10 ms and check increments: 10656:768, 13.88 us
39+
* 6. Start 46 tasks: 860:46, 18.70 us
40+
* 7. Yield and check increments: 648:47, 13.79 us
41+
* 8. Delay 10 ms and check increments: 10436:752, 13.88 us
4242
*
4343
* @section Results Arduino 1.6.7, Arduino Due
4444
* SchedulerBenchmark: started
45-
* 1. Initiate scheduler and main task: 1 us
46-
* 2. Yield main task: 1.36 us
47-
* 3. Start a task: 4 us
48-
* 4. Yield between two tasks: 2.92 us
49-
* 5. Delay 10 ms and check increments: 9711:3133, 3.10 us
45+
* 1. Initiate scheduler and main task: 2 us
46+
* 2. Yield main task: 1.30 us
47+
* 3. Start a task: 3 us
48+
* 4. Yield between two tasks: 2.80 us
49+
* 5. Delay 10 ms and check increments: 9497:3186, 2.98 us
5050
* 6. Start 51 tasks: 112:51, 2.20 us
51-
* 7. Yield and check increments: 81:52, 1.56 us
52-
* 8. Delay 10 ms and check increments: 9939:6292, 1.58 us
53-
51+
* 7. Yield and check increments: 78:52, 1.50 us
52+
* 8. Delay 10 ms and check increments: 9874:6500, 1.52 us
53+
*
5454
* @section Results Arduino 1.6.7, Teensy 3.1 (72 MHz)
5555
* SchedulerBenchmark: started
5656
* 1. Initiate scheduler and main task: 1 us

examples/SchedulerBenchmarkChannel/SchedulerBenchmarkChannel.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
1919
* Benchmark Scheduler Channel.
2020
*
2121
* @section Results Arduino 1.6.7
22-
* Messages per second (send/recv).
23-
* Arduino Pro-Mini 24328 (41.10 us)
24-
* Arduino Mega 2560 21704 (46.07 us)
25-
* Arduino Due 168344 (5.94 us)
22+
* Messages per second (send/recv). PAYLOAD 1, 8
23+
* Arduino Pro-Mini 23921 (41.80 us), 22002 (45.45 us)
24+
* Arduino Mega 2560 21379 (46.77 us), 19834 (50.41 us)
25+
* Arduino Due 165322 (6.05 us), 160893 (6.22 us)
2626
*/
2727

2828
#include <Scheduler.h>
2929
#include <Scheduler/Channel.h>
3030

31-
const size_t PAYLOAD_MAX = 1;
31+
// const size_t PAYLOAD_MAX = 1;
32+
const size_t PAYLOAD_MAX = 8;
3233
struct msg_t {
33-
int payload[PAYLOAD_MAX];
34+
uint8_t payload[PAYLOAD_MAX];
3435
};
3536

3637
Channel chan;
@@ -51,11 +52,10 @@ void loop()
5152
{
5253
unsigned long start = millis();
5354
await(millis() - start >= 1000);
54-
Serial.print(millis());
55-
Serial.print(F(":loop::count="));
5655
Serial.print(count);
57-
Serial.print(F(", us="));
58-
Serial.println(1000000.0 / count);
56+
Serial.print(F(" ("));
57+
Serial.print(1000000.0 / count);
58+
Serial.println(F(" us)"));
5959
Serial.flush();
6060
count = 0;
6161
}

examples/SchedulerBenchmarkQueue/SchedulerBenchmarkQueue.ino

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@
1919
* Benchmark Scheduler Queue.
2020
*
2121
* @section Results Arduino 1.6.7
22-
* Events per second (push/pull).
23-
* Board\QUEUE_MAX 2, 8
24-
* Arduino Pro-Mini 24033 (41.61 us), 92652 (10.79 us)
25-
* Arduino Mega 2560 21470 (46.58 us), 86940 (11.50 us)
26-
* Arduino Due 178364 (5.61 us), 667499 (1.50 us)
27-
* Teensy 3.1 (72 MHz) 251880 (3.97 us), 973938 (1.03 us)
22+
* Events per second (push/pull). QUEUE_MAX 2, 8
23+
* Arduino Pro-Mini 24029 (41.62 us), 92638 (10.79 us)
24+
* Arduino Mega 2560 21466 (46.59 us), 86919 (11.50 us)
25+
* Arduino Due 183411 (5.45 us), 677502 (1.48 us)
2826
*/
2927

3028
#include <Scheduler.h>
3129
#include <Scheduler/Queue.h>
3230

33-
const unsigned int QUEUE_MAX = 2;
31+
// const unsigned int QUEUE_MAX = 2;
32+
const unsigned int QUEUE_MAX = 8;
3433
typedef int event_t;
3534
Queue<event_t, QUEUE_MAX> queue;
3635
unsigned long count = 0;
@@ -50,11 +49,10 @@ void loop()
5049
{
5150
unsigned long start = millis();
5251
await(millis() - start >= 1000);
53-
Serial.print(millis());
54-
Serial.print(F(":loop::count="));
5552
Serial.print(count);
56-
Serial.print(F(", us="));
57-
Serial.println(1000000.0 / count);
53+
Serial.print(F(" ("));
54+
Serial.print(1000000.0 / count);
55+
Serial.println(F(" us)"));
5856
Serial.flush();
5957
count = 0;
6058
}

examples/SchedulerBenchmarkSemaphore/SchedulerBenchmarkSemaphore.ino

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
*
2121
* @section Results Arduino 1.6.7
2222
* Semaphore wait/signal per seconds.
23-
* Arduino Pro-Mini 26319 (38 us)
24-
* Arduino Mega 2560 23293 (43 us)
25-
* Arduino Due 210090 (4.76 us)
26-
* Teensy 3.1 (72 MHz) 277145 (3.61 us)
23+
* Arduino Pro-Mini 26337 (37.97 us)
24+
* Arduino Mega 2560 23289 (42.94 us)
25+
* Arduino Due 196770 (5.08 us)
2726
*/
2827

2928
#include <Scheduler.h>
@@ -47,11 +46,10 @@ void loop()
4746
{
4847
unsigned long start = millis();
4948
await(millis() - start >= 1000);
50-
Serial.print(millis());
51-
Serial.print(F(":loop::count="));
5249
Serial.print(count);
53-
Serial.print(F(", us="));
54-
Serial.println(1000000.0 / count);
50+
Serial.print(F(" ("));
51+
Serial.print(1000000.0 / count);
52+
Serial.println(F(" us)"));
5553
Serial.flush();
5654
count = 0;
5755
}

0 commit comments

Comments
 (0)