-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new message to support native profiling of threads and resource u…
…sage
- Loading branch information
Showing
4 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
spec/tests/yaml/swiftnav/sbp/profiling/test_MsgProfilingResourceCounter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
description: Unit tests for swiftnav.sbp.profiling MSgProfilingResourceCounter | ||
generated_on: 2024-02-01 00:00:00.00 # manually generated | ||
package: sbp.profiling | ||
tests: | ||
|
||
|
||
- msg: | ||
c_decoded_fields: | ||
n_buckets: | ||
handle_as: vararray-len | ||
relates_to: buckets | ||
value: 6 | ||
fields: | ||
seq_no: 1 | ||
seq_len: 3 | ||
buckets: | ||
- name: "Fusion engine\0\0\0\0\0\0\0\0" | ||
thread: 1 | ||
mutex: 2 | ||
cv: 2 | ||
io: 0 | ||
heap_bytes_alloc: 927480 | ||
heap_bytes_free: 0 | ||
io_write: 0 | ||
io_read: 0 | ||
- name: "NTRIP client\0\0\0\0\0\0\0\0\0" | ||
thread: 1 | ||
mutex: 1 | ||
cv: 1 | ||
io: 1 | ||
heap_bytes_alloc: 84454 | ||
heap_bytes_free: 0 | ||
io_write: 879 | ||
io_read: 19520 | ||
- name: "SSR2OSR\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
thread: 1 | ||
mutex: 1 | ||
cv: 1 | ||
io: 0 | ||
heap_bytes_alloc: 4328776 | ||
heap_bytes_free: 0 | ||
io_write: 0 | ||
io_read: 0 | ||
- name: "Periodic\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
thread: 1 | ||
mutex: 2 | ||
cv: 1 | ||
io: 0 | ||
heap_bytes_alloc: 247112 | ||
heap_bytes_free: 0 | ||
io_write: 0 | ||
io_read: 0 | ||
- name: "IMU\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
thread: 1 | ||
mutex: 1 | ||
cv: 1 | ||
io: 1 | ||
heap_bytes_alloc: 18305 | ||
heap_bytes_free: 0 | ||
io_write: 0 | ||
io_read: 26207 | ||
- name: "sbp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
thread: 5 | ||
mutex: 2 | ||
cv: 2 | ||
io: 2 | ||
heap_bytes_alloc: 43507 | ||
heap_bytes_free: 0 | ||
io_write: 235451 | ||
io_read: 498 | ||
module: sbp.profiling | ||
name: MsgProfilingResourceCounter | ||
msg_type: '0xcf03' | ||
raw_json: > | ||
{"crc": 39349, "preamble": 85, "sender": 4096, "length": 248, "msg_type": 52995, | ||
"seq_no": 1, "seq_len": 3, "buckets": [ | ||
{"name": "Fusion engine\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 1, "mutex": 2, "cv": 2, "io": 0, "heap_bytes_alloc": 927480, "heap_bytes_free": 0, "io_write": 0, "io_read": 0}, | ||
{"name": "NTRIP client\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 1, "mutex": 1, "cv": 1, "io": 1, "heap_bytes_alloc": 84454, "heap_bytes_free": 0, "io_write": 879, "io_read": 19520}, | ||
{"name": "SSR2OSR\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 1, "mutex": 1, "cv": 1, "io": 0, "heap_bytes_alloc": 4328776, "heap_bytes_free": 0, "io_write": 0, "io_read": 0}, | ||
{"name": "Periodic\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 1, "mutex": 2, "cv": 1, "io": 0, "heap_bytes_alloc": 247112, "heap_bytes_free": 0, "io_write": 0, "io_read": 0}, | ||
{"name": "IMU\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 1, "mutex": 1, "cv": 1, "io": 1, "heap_bytes_alloc": 18305, "heap_bytes_free": 0, "io_write": 0, "io_read": 26207}, | ||
{"name": "sbp\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "thread": 5, "mutex": 2, "cv": 2, "io": 2, "heap_bytes_alloc": 43507, "heap_bytes_free": 0, "io_write": 235451, "io_read": 498}], | ||
"payload": "AQNGdXNpb24gZW5naW5lAAAAAAAAAAABAgIA+CYOAAAAAAAAAAAAAAAAAE5UUklQIGNsaWVudAAAAAAAAAAAAAEBAQHmSQEAAAAAAG8DAABATAAAU1NSMk9TUgAAAAAAAAAAAAAAAAAAAQEBAEgNQgAAAAAAAAAAAAAAAABQZXJpb2RpYwAAAAAAAAAAAAAAAAABAgEASMUDAAAAAAAAAAAAAAAAAElNVQAAAAAAAAAAAAAAAAAAAAAAAAEBAQGBRwAAAAAAAAAAAABfZgAAc2JwAAAAAAAAAAAAAAAAAAAAAAAABQICAvOpAAAAAAAAu5cDAPIBAAA="} | ||
raw_packet: VQPPABD4AQNGdXNpb24gZW5naW5lAAAAAAAAAAABAgIA+CYOAAAAAAAAAAAAAAAAAE5UUklQIGNsaWVudAAAAAAAAAAAAAEBAQHmSQEAAAAAAG8DAABATAAAU1NSMk9TUgAAAAAAAAAAAAAAAAAAAQEBAEgNQgAAAAAAAAAAAAAAAABQZXJpb2RpYwAAAAAAAAAAAAAAAAABAgEASMUDAAAAAAAAAAAAAAAAAElNVQAAAAAAAAAAAAAAAAAAAAAAAAEBAQGBRwAAAAAAAAAAAABfZgAAc2JwAAAAAAAAAAAAAAAAAAAAAAAABQICAvOpAAAAAAAAu5cDAPIBAAC1mQ== | ||
sbp: | ||
crc: '0x99b5' | ||
length: 248 | ||
msg_type: '0xcf03' | ||
payload: AQNGdXNpb24gZW5naW5lAAAAAAAAAAABAgIA+CYOAAAAAAAAAAAAAAAAAE5UUklQIGNsaWVudAAAAAAAAAAAAAEBAQHmSQEAAAAAAG8DAABATAAAU1NSMk9TUgAAAAAAAAAAAAAAAAAAAQEBAEgNQgAAAAAAAAAAAAAAAABQZXJpb2RpYwAAAAAAAAAAAAAAAAABAgEASMUDAAAAAAAAAAAAAAAAAElNVQAAAAAAAAAAAAAAAAAAAAAAAAEBAQGBRwAAAAAAAAAAAABfZgAAc2JwAAAAAAAAAAAAAAAAAAAAAAAABQICAvOpAAAAAAAAu5cDAPIBAAA= | ||
preamble: '0x55' | ||
sender: '0x1000' |
29 changes: 29 additions & 0 deletions
29
spec/tests/yaml/swiftnav/sbp/profiling/test_MsgProfilingSystemInfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
description: Unit tests for swiftnav.sbp.profiling MsgProfilingSystemInfo | ||
generated_on: 2024-02-01 00:00:00.00 # manually generated | ||
package: sbp.profiling | ||
tests: | ||
|
||
|
||
- msg: | ||
fields: | ||
total_cpu_time: 3418210 | ||
age: 10292338 | ||
n_threads: 27 | ||
heap_usage: 14861128 | ||
module: sbp.profiling | ||
name: MsgProfilingSystemInfo | ||
|
||
msg_type: '0xcf01' | ||
raw_json: > | ||
{"crc": 16892, "preamble": 85, "sender": 4096, "length": 21, "msg_type": 52993, | ||
"total_cpu_time": 3418210, "age": 10292338, "n_threads": 27, "heap_usage": 14861128, | ||
"payload": "Yig0AAAAAAByDJ0AAAAAABtIw+IA"} | ||
raw_packet: VQHPABAVYig0AAAAAAByDJ0AAAAAABtIw+IA/EE= | ||
sbp: | ||
crc: '0x41fc' | ||
length: 21 | ||
msg_type: '0xcf01' | ||
payload: Yig0AAAAAAByDJ0AAAAAABtIw+IA | ||
preamble: '0x55' | ||
sender: '0x1000' |
38 changes: 38 additions & 0 deletions
38
spec/tests/yaml/swiftnav/sbp/profiling/test_MsgProfilingThreadInfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
description: Unit tests for swiftnav.sbp.profiling MsgProfilingThreadInfo | ||
generated_on: 2024-02-01 00:00:00.00 # manually generated | ||
package: sbp.profiling | ||
tests: | ||
|
||
|
||
- msg: | ||
c_decoded_fields: | ||
name: | ||
handle_as: encoded-string | ||
text: Fusion engine | ||
fn_prefix: sbp_msg_profiling_thread_info_name | ||
encoded_len: 14 | ||
fields: | ||
total_cpu_time: 678775 | ||
age: 10159470 | ||
state: 1 | ||
stack_size: 8388608 | ||
stack_usage: 275920 | ||
name: "Fusion engine\u0000" | ||
module: sbp.profiling | ||
name: MsgProfilingThreadInfo | ||
|
||
msg_type: '0xcf02' | ||
raw_json: > | ||
{"crc": 43762, "preamble": 85, "sender": 4096, "length": 39, "msg_type": 52994, | ||
"total_cpu_time": 678775, "age": 10159470, "state": 1, "stack_size": 8388608, | ||
"stack_usage": 275920, "name": "Fusion engine\u0000", | ||
"payload": "d1sKAAAAAABuBZsAAAAAAAEAAIAA0DUEAEZ1c2lvbiBlbmdpbmUA"} | ||
raw_packet: VQLPABAnd1sKAAAAAABuBZsAAAAAAAEAAIAA0DUEAEZ1c2lvbiBlbmdpbmUA8qo= | ||
sbp: | ||
crc: '0xaaf2' | ||
length: 39 | ||
msg_type: '0xcf02' | ||
payload: d1sKAAAAAABuBZsAAAAAAAEAAIAA0DUEAEZ1c2lvbiBlbmdpbmUA | ||
preamble: '0x55' | ||
sender: '0x1000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters