-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trace messages for automation #12732
Conversation
Framework this into a registry of handlers for different message types.connectedhomeip/examples/common/tracing/TraceHandlers.cpp Lines 78 to 88 in 0628c43
This comment was generated by todo based on a
|
PR #12732: Size comparison from e4f3246 to 4db3546 Full report (25 builds for efr32, esp32, k32w, nrfconnect, p6, qpg, telink)
|
0e1a07b
to
7658deb
Compare
PR #12732: Size comparison from f2e7df8 to 7658deb Increases above 0.2%:
Increases (1 build for linux)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
6a9e4a5
to
cc70f8f
Compare
cc70f8f
to
15f5298
Compare
Add a trace backend to linux/chip-tool which provides a simple and flexible way to trace chip messages. The backend provides handlers, which can be registered to handle the different types of messages and extract the relevant data needed for test automation. Added additional optional flags to chip-tool which allows turning on these traces and piping them either to a log or file. These flags and tracing are only enabled when tracing is enabled at compile time. Include trace compile with: gn gen out/with_trace/ --args='import("//with_pw_trace.gni")' The trace point is before the encrypt in SecureMessageCodec and only enabled when chip_enable_transport_trace is defined at compile time and a pw_trace backend is configured.
15f5298
to
715c7ef
Compare
PR #12732: Size comparison from 857d6c5 to 715c7ef Increases above 0.2%:
Increases (2 builds for linux)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
@andy31415 @yunhanw-google @woody-apple @tcarmelveilleux this broke critical TE 7.5 testing functionality. See #13016 |
Problem
Specific data from messages are needed for test validation, it is desirable to have a simple and flexible way to extract this data without requiring logging wrapped in macros directly in the protocols #11510, #11553, #11552.
Change overview
Add a trace backend to chip-tool which provides a simple and flexible way to trace chip messages. The backend provides handlers, which can be registered to handle the different types of messages and extract the relevant data needed for test automation.
Added additional optional flags to chip-tool which allows turning on these traces and piping them either to a log or file. These flags and tracing are only enabled when tracing is enabled at compile time. Include trace compile with:
The trace point is before the encrypt in SecureMessageCodec and only enabled when
PW_TRACE_CHIP_ENABLED
is defined at compile time and a pw_trace backend is configured.Note: This is just adding the plumbing to get the message data in a centralized spot with a framework to write and register handlers which can interpret the messages. Writing these handlers for the different messages will be the next step.
Testing
Compiled chip-tool with and without tracing enabled, piped tracing to log and to file and commissioned a device:
Which generated the following trace.log file: