-
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
Added macro variants with metric support matching the ones in CodeUtils #32553
Conversation
anush-apple
commented
Mar 12, 2024
- Added Verify/Return/Log/Succ/Exit XYZ WithMetric macro variants for use in metrics
- Added unit tests for these macro variants
- Added Verify/Return/Log/Succ/Exit XYZ WithMetric macro variants for use in metrics - Added unit tests for these macro variants
PR #32553: Size comparison from 1404f80 to 2d728ca Decreases (3 builds for efr32)
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
|
* @def ReturnErrorOnFailureWithMetric(kMetricKey, expr) | ||
* | ||
* @brief | ||
* This macros emits the specified metric with error code and returns the error code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This macro"
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* does not evaluate to CHIP_NO_ERROR. Value of the metric is to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "evaluates does not evaluate" mean?
What does "is to the result" mean?
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* does not evaluate to CHIP_NO_ERROR. Value of the metric is to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same questions as above.
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* does not evaluate to CHIP_NO_ERROR. Value of the metric is to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same questions as above.
* | ||
* @brief | ||
* Returns a specified error code if expression evaluates to false. If the expression evaluates | ||
* to false, a metric with the specified key is emitted with the value set to the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to the error code"? Or "to code"? Either would be better than what we have here.
* @endcode | ||
* | ||
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* to false. Value of the metric is to value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "to value" mean?
* @endcode | ||
* | ||
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* to false. Value of the metric is to code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "to code" mean here?
* @endcode | ||
* | ||
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* to true. Value of the metric is to code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to code"?
* | ||
* @brief | ||
* Logs a message if the expression returns something different than CHIP_NO_ERROR. | ||
* In addition, a metric is emitted with the specified key and value set to result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to the result".
* @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates | ||
* does not evaluate to CHIP_NO_ERROR. Value of the metric is to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See questions above, for both the evaluate part and "is to the" part.
…ls (project-chip#32553) - Added Verify/Return/Log/Succ/Exit XYZ WithMetric macro variants for use in metrics - Added unit tests for these macro variants