PX4 Firmware
PX4 Autopilot Software http://px4.io
test_microbench_uorb.cpp File Reference

Tests for microbench uORB functionality. More...

#include <unit_test.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <drivers/drv_hrt.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/micro_hal.h>
#include <uORB/Subscription.hpp>
#include <uORB/topics/sensor_accel.h>
#include <uORB/topics/sensor_gyro.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_status.h>
Include dependency graph for test_microbench_uorb.cpp:

Go to the source code of this file.

Classes

class  MicroBenchORB::MicroBenchORB
 

Namespaces

 MicroBenchORB
 

Macros

#define PERF(name, op, count)
 

Functions

void MicroBenchORB::lock ()
 
void MicroBenchORB::unlock ()
 
template<typename T >
MicroBenchORB::random (T min, T max)
 
 MicroBenchORB::ut_declare_test_c (test_microbench_uorb, MicroBenchORB) bool MicroBenchORB
 

Detailed Description

Tests for microbench uORB functionality.

Definition in file test_microbench_uorb.cpp.

Macro Definition Documentation

◆ PERF

#define PERF (   name,
  op,
  count 
)
Value:
do { \
px4_usleep(1000); \
reset(); \
perf_counter_t p = perf_alloc(PC_ELAPSED, name); \
for (int i = 0; i < count; i++) { \
lock(); \
perf_begin(p); \
op; \
perf_end(p); \
unlock(); \
reset(); \
} \
perf_print_counter(p); \
perf_free(p); \
} while (0)
measure the time elapsed performing an event
Definition: perf_counter.h:56
#define perf_alloc(a, b)
Definition: px4io.h:59
const char * name
Definition: tests_main.c:58

Definition at line 78 of file test_microbench_uorb.cpp.

Referenced by MicroBenchORB::MicroBenchORB::time_px4_uorb_direct(), and MicroBenchORB::ut_declare_test_c().