You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add stats option to analyze command for performance insights (#1237)
* feat: add stats option to analyze command for performance insights
Introduced a new feature to the analyze command that enables users to print detailed performance statistics of each analyzer. This enhancement aids in debugging and understanding the time taken by various components during analysis, providing valuable insights for performance optimization.
Signed-off-by: Matthis Holleville <[email protected]>
* feat: enhance analysis command with statistics option
Refactored the analysis command to support an enhanced statistics option, enabling users to opt-in for detailed performance metrics of the analysis process. This change introduces a more flexible approach to handling statistics, allowing for a clearer separation between the analysis output and performance metrics, thereby improving the usability and insights provided to the user.
Signed-off-by: Matthis Holleville <[email protected]>
---------
Signed-off-by: Matthis Holleville <[email protected]>
Co-authored-by: Alex Jones <[email protected]>
Co-authored-by: Aris Boutselis <[email protected]>
AnalyzeCmd.Flags().StringVarP(&labelSelector, "selector", "L", "", "Label selector (label query) to filter on, supports '=', '==', and '!='. (e.g. -L key1=value1,key2=value2). Matching objects must satisfy all of the specified label constraints.")
output.WriteString(color.YellowString("The stats mode allows for debugging and understanding the time taken by an analysis by displaying the statistics of each analyzer.\n"))
62
+
63
+
for_, stat:=rangea.Stats {
64
+
output.WriteString(fmt.Sprintf("- Analyzer %s took %s \n", color.YellowString(stat.Analyzer), stat.DurationTime))
0 commit comments