diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-07 17:16:15 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-01-11 11:03:55 +0100 |
commit | 4712c75dea935b5709c944b31ae670dd6879f2e9 (patch) | |
tree | 1139b8b2ccef9f35831c4ee16904d012cacdac89 | |
parent | 76821607130eab7916b70d789a189b2a52a115da (diff) | |
download | px4-firmware-4712c75dea935b5709c944b31ae670dd6879f2e9.tar.gz px4-firmware-4712c75dea935b5709c944b31ae670dd6879f2e9.tar.bz2 px4-firmware-4712c75dea935b5709c944b31ae670dd6879f2e9.zip |
IO driver: Log the total system latency up to the IO transfer
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 58390ba4c..ed9487cf9 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -263,6 +263,7 @@ private: perf_counter_t _perf_update; ///<local performance counter for status updates perf_counter_t _perf_write; ///<local performance counter for PWM control writes perf_counter_t _perf_chan_count; ///<local performance counter for channel number changes + perf_counter_t _perf_system_latency; ///< total system latency /* cached IO state */ uint16_t _status; ///< Various IO status flags @@ -494,6 +495,7 @@ PX4IO::PX4IO(device::Device *interface) : _perf_update(perf_alloc(PC_ELAPSED, "io update")), _perf_write(perf_alloc(PC_ELAPSED, "io write")), _perf_chan_count(perf_alloc(PC_COUNT, "io rc #")), + _perf_system_latency(perf_alloc_once(PC_ELAPSED, "sys_latency")), _status(0), _alarms(0), _t_actuator_controls_0(-1), @@ -1086,6 +1088,7 @@ int PX4IO::io_set_control_groups() { int ret = io_set_control_state(0); + perf_end(_perf_system_latency); /* send auxiliary control groups */ (void)io_set_control_state(1); |