Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
|
Go to the source code of this file.
Macros | |
#define | BENCHMARK_BASELINE(scale) |
#define | BENCHMARK(msg, scale) |
#define | MEASURE(expr) BENCHMARK(#expr,1) expr |
Functions | |
void | noop () |
Variables | |
static uint32_t | _start |
static uint32_t | _baseline = 0 |
static uint32_t | _benchmark |
Copyright (C) 2017, Mikael Patel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Definition in file benchmark.h.
#define BENCHMARK | ( | msg, | |
scale | |||
) |
Benchmark support macro. Use in the form:
Prints description message and time to execute the statement in micro-seconds. The maximum resolution depends on micros() and is typically 4 us (F_CPU is 16 MHz). Message strings are stored in program memory.
[in] | msg | description of the benchmark. |
[in] | scale | number of block executions. |
Definition at line 52 of file benchmark.h.
#define BENCHMARK_BASELINE | ( | scale | ) |
Calculate and set benchmark baseline. Should be called in setup().
[in] | scale | number of block executions. |
Definition at line 34 of file benchmark.h.
#define MEASURE | ( | expr | ) | BENCHMARK(#expr,1) expr |
Execution time measurement support macro. Use in the form:
Executes given expression and prints time to execute micro- seconds. The maximum resolution depends on micros() and is typically 4 us (F_CPU is 16 MHz).
[in] | expr | expression to execute and measure. |
Definition at line 70 of file benchmark.h.
|
inline |
Benchmark support function.
Definition at line 28 of file benchmark.h.
|
static |
Definition at line 23 of file benchmark.h.
|
static |
Definition at line 24 of file benchmark.h.
|
static |
Benchmark timestamp variables.
Definition at line 23 of file benchmark.h.