Skip to content
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

[ESP32] Added a config option to set the permit list size for esp32 traces. #32035

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,16 @@ menu "CHIP Device Layer"
default n
help
This option enables the system statistics to be sent to the insights cloud.

config MAX_PERMIT_LIST_SIZE
int "Set permit list size for Insights traces"
range 5 30
depends on ESP_INSIGHTS_ENABLED
default 20
shripad621git marked this conversation as resolved.
Show resolved Hide resolved
help
Maximum number of group entries that can be included in the permit list for reporting
the traces to insights.

endmenu


Expand Down
5 changes: 2 additions & 3 deletions src/tracing/esp32_trace/counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

namespace Insights {

/*
*
/**
* This class is used to monotonically increment the counters as per the label of the counter macro
* 'MATTER_TRACE_COUNTER(label)' and report the metrics to esp-insights.
* As per the label of the counter macro, it adds the counter in the linked list with the name label if not
Expand All @@ -37,7 +36,7 @@ class ESPInsightsCounter
{
private:
static ESPInsightsCounter * mHead; // head of the counter list
const char * label; // unique key
const char * label; // unique key ,it is used as a static string.
int instanceCount;
ESPInsightsCounter * mNext; // pointer to point to the next entry in the list
bool registered = false;
Expand Down
2 changes: 1 addition & 1 deletion src/tracing/esp32_trace/esp32_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Tracing {
namespace Insights {
namespace {

constexpr size_t kPermitListMaxSize = 20;
constexpr size_t kPermitListMaxSize = CONFIG_MAX_PERMIT_LIST_SIZE;
using HashValue = uint32_t;

// Implements a murmurhash with 0 seed.
Expand Down
Loading