Skip to content

add metric filter for gcperfsim test#5186

Open
VincentBu wants to merge 2 commits intodotnet:mainfrom
VincentBu:AddMetricFilter
Open

add metric filter for gcperfsim test#5186
VincentBu wants to merge 2 commits intodotnet:mainfrom
VincentBu:AddMetricFilter

Conversation

@VincentBu
Copy link
Copy Markdown
Contributor

This pr adds metric filter for LowVolatilityRuns. It decides which metrics will be presented in results.md/results.json.

Copilot AI review requested due to automatic review settings April 14, 2026 01:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a metric filtering mechanism for GCPerfSim “LowVolatilityRuns” so that only selected metrics are emitted into Results.md / Results.json based on the output.columns list in the YAML configuration.

Changes:

  • Updated LowVolatilityRuns YAML configs to use canonical ResultItem metric names for output.columns / output.all_columns.
  • Re-enabled metric filtering in GCPerfSim markdown presentation generation.
  • Added metric filtering in GCPerfSim JSON presentation generation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure/Commands/RunCommand/BaseSuite/LowVolatilityRuns.yaml Updates the metric lists used for LowVolatilityRuns output selection.
src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure.Core/Presentation/GCPerfSim/Markdown.cs Re-enables filtering so markdown output only includes requested metrics.
src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure.Core/Presentation/GCPerfSim/Json.cs Filters JSON output to only requested metrics.
src/benchmarks/gc/GC.Infrastructure/Configurations/GCPerfSim/LowVolatilityRuns.yaml Mirrors the LowVolatilityRuns metric list updates for the main GCPerfSim configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 363 to +367
string propertyNameToCheck = property.Name.ToLowerInvariant();

// TODO: Add the property filter logic back in.
/*
if (!requestedPropertyNames.Contains(propertyNameToCheck))
{
//continue;
continue;
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-enabling this filter makes the output depend on Output.Columns matching ResultItem property names exactly. Many existing GCPerfSim YAML configs still use legacy/friendly column labels like Count, Speed, total pause time (msec), and PauseDurationSeconds_Sum (e.g., Configurations/GCPerfSim/Normal_Server.yaml), which do not correspond to any ResultItem property names, so those metrics will now be silently dropped from Results.md/Results.json for those configs. Consider adding an alias/normalization map (e.g., counttotalnumbergcs, speedspeed_mbpermsec, totalpausetimemsecpausedurationmsec_sum) and/or emitting a warning when a requested column name doesn’t match any property, or update all affected YAML configs in the same PR to the new canonical metric names.

Copilot uses AI. Check for mistakes.
Comment on lines +94 to +97
if (!requestedPropertyNames.Contains(propertyNameToCheck))
{
continue;
}
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the filter enabled, any Output.Columns entries that don’t match a ResultItem property name (after normalization) will be silently omitted from Results.json. Several existing GCPerfSim YAML configs still use legacy labels like Count, Speed, and total pause time (msec), which don’t map to ResultItem properties, so this change can unexpectedly drop metrics for those scenarios. Consider adding an alias/back-compat mapping (or warning on unmatched column names), or update the other GCPerfSim YAML configs to canonical property names in the same PR.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants