-
Couldn't load subscription status.
- Fork 219
Add UnifiedMessage support for NetworkPPSPerformanceMessage #4057
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
…ng them in metric names Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
|
@copilot resolve conflicts with main branch. |
|
@copilot fix mypy check errors |
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Fixed in commit 0eab4f9. Added proper type casting with |
|
@copilot fix check errors. |
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Fixed in commit f8c9e48. Removed unused |
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
| metrics.append( | ||
| { | ||
| "name": "test_type", | ||
| "value": float(hash(test_type)), |
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.
It's a string, not float. @copilot
Summary of Changes
Latest Update - Parameter Metrics for Strings
Added
test_typeandroleas Parameter type unified performance messages:lisa/tools/sar.py:
test_typeas a Parameter metricfloat(hash(test_type))to convert the string to a numeric value compatible with themetric_value: floattypelisa/microsoft/testsuites/dpdk/dpdkperf.py:
test_typeas a Parameter metric (if present in result_fields)roleas a Parameter metric (if present in result_fields)float(hash())to convert string values to numeric valuesDesign Rationale
Since
send_unified_perf_messagerequiresmetric_valueto be a float, but the reviewer requested that string parameters liketest_typeandroleshould be sent as Parameter metrics, I usedhash()to convert the strings to integers, then cast to float. This allows:MetricRelativity.Parameterto distinguish them from performance metricsAll checks continue to pass:
✅ flake8: No errors
✅ mypy: Zero type errors
✅ syntax: All files compile correctly
✅ imports: All imports work correctly
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.