diff --git a/c/include/libsbp/legacy/profiling.h b/c/include/libsbp/legacy/profiling.h index 766059d7f5..624913e2ed 100644 --- a/c/include/libsbp/legacy/profiling.h +++ b/c/include/libsbp/legacy/profiling.h @@ -43,13 +43,14 @@ SBP_PACK_START */ typedef struct SBP_ATTR_PACKED SBP_DEPRECATED { - u32 total_time; /**< Total time spent in measurement point */ + u32 total_time; /**< Total time spent in measurement point + (microseconds) */ u16 num_executions; /**< Number of times measurement point has executed */ - u32 min; /**< Minimum execution time */ - u32 max; /**< Maximum execution time */ + u32 min; /**< Minimum execution time (microseconds) */ + u32 max; /**< Maximum execution time (microseconds) */ u64 return_addr; /**< Return address */ u64 id; /**< Unique ID */ - u64 slice_time; /**< CPU slice time */ + u64 slice_time; /**< CPU slice time (milliseconds) */ u16 line; /**< Line number */ char func[0]; /**< Function name */ } msg_measurement_point_t; diff --git a/c/include/libsbp/profiling/MSG_MEASUREMENT_POINT.h b/c/include/libsbp/profiling/MSG_MEASUREMENT_POINT.h index c066ff3365..33e6f26ad6 100644 --- a/c/include/libsbp/profiling/MSG_MEASUREMENT_POINT.h +++ b/c/include/libsbp/profiling/MSG_MEASUREMENT_POINT.h @@ -46,7 +46,7 @@ extern "C" { */ typedef struct { /** - * Total time spent in measurement point + * Total time spent in measurement point (microseconds) */ u32 total_time; @@ -56,12 +56,12 @@ typedef struct { u16 num_executions; /** - * Minimum execution time + * Minimum execution time (microseconds) */ u32 min; /** - * Maximum execution time + * Maximum execution time (microseconds) */ u32 max; @@ -76,7 +76,7 @@ typedef struct { u64 id; /** - * CPU slice time + * CPU slice time (milliseconds) */ u64 slice_time; diff --git a/docs/sbp.pdf b/docs/sbp.pdf index 471e6bf4ac..a3e3ceb241 100644 Binary files a/docs/sbp.pdf and b/docs/sbp.pdf differ diff --git a/haskell/src/SwiftNav/SBP/Profiling.hs b/haskell/src/SwiftNav/SBP/Profiling.hs index 1b5fea774e..bf3e338297 100644 --- a/haskell/src/SwiftNav/SBP/Profiling.hs +++ b/haskell/src/SwiftNav/SBP/Profiling.hs @@ -45,19 +45,19 @@ msgMeasurementPoint = 0xCF00 -- Swift's engineering teams. data MsgMeasurementPoint = MsgMeasurementPoint { _msgMeasurementPoint_total_time :: !Word32 - -- ^ Total time spent in measurement point + -- ^ Total time spent in measurement point (microseconds) , _msgMeasurementPoint_num_executions :: !Word16 -- ^ Number of times measurement point has executed , _msgMeasurementPoint_min :: !Word32 - -- ^ Minimum execution time + -- ^ Minimum execution time (microseconds) , _msgMeasurementPoint_max :: !Word32 - -- ^ Maximum execution time + -- ^ Maximum execution time (microseconds) , _msgMeasurementPoint_return_addr :: !Word64 -- ^ Return address , _msgMeasurementPoint_id :: !Word64 -- ^ Unique ID , _msgMeasurementPoint_slice_time :: !Word64 - -- ^ CPU slice time + -- ^ CPU slice time (milliseconds) , _msgMeasurementPoint_line :: !Word16 -- ^ Line number , _msgMeasurementPoint_func :: !Text diff --git a/java/src/com/swiftnav/sbp/profiling/MsgMeasurementPoint.java b/java/src/com/swiftnav/sbp/profiling/MsgMeasurementPoint.java index 26cb1d4ae3..d32e2e3ebe 100644 --- a/java/src/com/swiftnav/sbp/profiling/MsgMeasurementPoint.java +++ b/java/src/com/swiftnav/sbp/profiling/MsgMeasurementPoint.java @@ -31,16 +31,16 @@ public class MsgMeasurementPoint extends SBPMessage { public static final int TYPE = 0xCF00; - /** Total time spent in measurement point */ + /** Total time spent in measurement point (microseconds) */ public long total_time; /** Number of times measurement point has executed */ public int num_executions; - /** Minimum execution time */ + /** Minimum execution time (microseconds) */ public long min; - /** Maximum execution time */ + /** Maximum execution time (microseconds) */ public long max; /** Return address */ @@ -49,7 +49,7 @@ public class MsgMeasurementPoint extends SBPMessage { /** Unique ID */ public BigInteger id; - /** CPU slice time */ + /** CPU slice time (milliseconds) */ public BigInteger slice_time; /** Line number */ diff --git a/javascript/sbp/profiling.js b/javascript/sbp/profiling.js index a72ef10128..fd2f5a082f 100644 --- a/javascript/sbp/profiling.js +++ b/javascript/sbp/profiling.js @@ -31,13 +31,13 @@ let UInt64 = require('cuint').UINT64; * engineering teams. * * Fields in the SBP payload (`sbp.payload`): - * @field total_time number (unsigned 32-bit int, 4 bytes) Total time spent in measurement point + * @field total_time number (unsigned 32-bit int, 4 bytes) Total time spent in measurement point (microseconds) * @field num_executions number (unsigned 16-bit int, 2 bytes) Number of times measurement point has executed - * @field min number (unsigned 32-bit int, 4 bytes) Minimum execution time - * @field max number (unsigned 32-bit int, 4 bytes) Maximum execution time + * @field min number (unsigned 32-bit int, 4 bytes) Minimum execution time (microseconds) + * @field max number (unsigned 32-bit int, 4 bytes) Maximum execution time (microseconds) * @field return_addr number (unsigned 64-bit int, 8 bytes) Return address * @field id number (unsigned 64-bit int, 8 bytes) Unique ID - * @field slice_time number (unsigned 64-bit int, 8 bytes) CPU slice time + * @field slice_time number (unsigned 64-bit int, 8 bytes) CPU slice time (milliseconds) * @field line number (unsigned 16-bit int, 2 bytes) Line number * @field func string Function name * diff --git a/kaitai/ksy/profiling.ksy b/kaitai/ksy/profiling.ksy index cbcf6c381b..6acde05f09 100644 --- a/kaitai/ksy/profiling.ksy +++ b/kaitai/ksy/profiling.ksy @@ -28,7 +28,7 @@ types: seq: - id: total_time doc: | - Total time spent in measurement point + Total time spent in measurement point (microseconds) type: u4 - id: num_executions doc: | @@ -36,11 +36,11 @@ types: type: u2 - id: min doc: | - Minimum execution time + Minimum execution time (microseconds) type: u4 - id: max doc: | - Maximum execution time + Maximum execution time (microseconds) type: u4 - id: return_addr doc: | @@ -52,7 +52,7 @@ types: type: u8 - id: slice_time doc: | - CPU slice time + CPU slice time (milliseconds) type: u8 - id: line doc: | diff --git a/python/sbp/profiling.py b/python/sbp/profiling.py index 721352db6a..e097f99471 100644 --- a/python/sbp/profiling.py +++ b/python/sbp/profiling.py @@ -43,19 +43,19 @@ class MsgMeasurementPoint(SBP): sbp : SBP SBP parent object to inherit from. total_time : int - Total time spent in measurement point + Total time spent in measurement point (microseconds) num_executions : int Number of times measurement point has executed min : int - Minimum execution time + Minimum execution time (microseconds) max : int - Maximum execution time + Maximum execution time (microseconds) return_addr : int Return address id : int Unique ID slice_time : int - CPU slice time + CPU slice time (milliseconds) line : int Line number func : string diff --git a/rust/sbp/src/messages/profiling.rs b/rust/sbp/src/messages/profiling.rs index 755a4a2fce..bba31cb7d4 100644 --- a/rust/sbp/src/messages/profiling.rs +++ b/rust/sbp/src/messages/profiling.rs @@ -34,16 +34,16 @@ pub mod msg_measurement_point { /// The message sender_id #[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))] pub sender_id: Option, - /// Total time spent in measurement point + /// Total time spent in measurement point (microseconds) #[cfg_attr(feature = "serde", serde(rename = "total_time"))] pub total_time: u32, /// Number of times measurement point has executed #[cfg_attr(feature = "serde", serde(rename = "num_executions"))] pub num_executions: u16, - /// Minimum execution time + /// Minimum execution time (microseconds) #[cfg_attr(feature = "serde", serde(rename = "min"))] pub min: u32, - /// Maximum execution time + /// Maximum execution time (microseconds) #[cfg_attr(feature = "serde", serde(rename = "max"))] pub max: u32, /// Return address @@ -52,7 +52,7 @@ pub mod msg_measurement_point { /// Unique ID #[cfg_attr(feature = "serde", serde(rename = "id"))] pub id: u64, - /// CPU slice time + /// CPU slice time (milliseconds) #[cfg_attr(feature = "serde", serde(rename = "slice_time"))] pub slice_time: u64, /// Line number diff --git a/spec/yaml/swiftnav/sbp/profiling.yaml b/spec/yaml/swiftnav/sbp/profiling.yaml index 11d1d525f0..11c5d41254 100644 --- a/spec/yaml/swiftnav/sbp/profiling.yaml +++ b/spec/yaml/swiftnav/sbp/profiling.yaml @@ -26,16 +26,16 @@ definitions: fields: - total_time: type: u32 - desc: Total time spent in measurement point + desc: Total time spent in measurement point (microseconds) - num_executions: type: u16 desc: Number of times measurement point has executed - min: type: u32 - desc: Minimum execution time + desc: Minimum execution time (microseconds) - max: type: u32 - desc: Maximum execution time + desc: Maximum execution time (microseconds) - return_addr: type: u64 desc: Return address @@ -44,7 +44,7 @@ definitions: desc: Unique ID - slice_time: type: u64 - desc: CPU slice time + desc: CPU slice time (milliseconds) - line: type: u16 desc: Line number