PX4 Firmware
PX4 Autopilot Software http://px4.io
|
SD Card benchmarking. More...
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/module.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/log.h>
#include <drivers/drv_hrt.h>
Go to the source code of this file.
Functions | |
static void | usage (void) |
static void | write_test (int fd, uint8_t *block, int block_size) |
sequential write speed test More... | |
static unsigned int | time_fsync (int fd) |
Measure the time for fsync. More... | |
__EXPORT int | sd_bench_main (int argc, char *argv[]) |
Variables | |
static const char * | BENCHMARK_FILE = PX4_STORAGEDIR"/benchmark.tmp" |
static int | num_runs |
number of runs More... | |
static int | run_duration |
duration of a single run [ms] More... | |
static bool | synchronized |
call fsync after each block? More... | |
SD Card benchmarking.
Definition in file sd_bench.c.
int sd_bench_main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 85 of file sd_bench.c.
References BENCHMARK_FILE, num_runs, run_duration, usage(), and write_test().
|
inlinestatic |
Measure the time for fsync.
fd |
Definition at line 155 of file sd_bench.c.
References hrt_absolute_time(), hrt_abstime, and hrt_elapsed_time().
Referenced by write_test().
|
static |
Definition at line 73 of file sd_bench.c.
Referenced by sd_bench_main().
|
static |
sequential write speed test
Definition at line 162 of file sd_bench.c.
References hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), num_runs, run_duration, start(), time_fsync(), and write().
Referenced by sd_bench_main().
|
static |
Definition at line 66 of file sd_bench.c.
Referenced by sd_bench_main().
|
static |
number of runs
Definition at line 68 of file sd_bench.c.
Referenced by sd_bench_main(), and write_test().
|
static |
duration of a single run [ms]
Definition at line 69 of file sd_bench.c.
Referenced by sd_bench_main(), and write_test().
|
static |
call fsync after each block?
Definition at line 70 of file sd_bench.c.