Merge pull request #8974 from oss-qm/submit/metrics_unused_retval
ctr: metrics: drop unused retval from printWindowsStats()
This commit is contained in:
commit
7c850bac2e
@ -94,9 +94,7 @@ var metricsCommand = cli.Command{
|
|||||||
case *v2.Metrics:
|
case *v2.Metrics:
|
||||||
printCgroup2MetricsTable(w, v)
|
printCgroup2MetricsTable(w, v)
|
||||||
case *wstats.Statistics:
|
case *wstats.Statistics:
|
||||||
if err := printWindowsStats(w, v); err != nil {
|
printWindowsStats(w, v)
|
||||||
return fmt.Errorf("cannot convert metrics data from windows.Statistics: %w", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return w.Flush()
|
return w.Flush()
|
||||||
case formatJSON:
|
case formatJSON:
|
||||||
@ -151,7 +149,7 @@ func printCgroup2MetricsTable(w *tabwriter.Writer, data *v2.Metrics) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printWindowsStats(w *tabwriter.Writer, windowsStats *wstats.Statistics) error {
|
func printWindowsStats(w *tabwriter.Writer, windowsStats *wstats.Statistics) {
|
||||||
if windowsStats.GetLinux() != nil {
|
if windowsStats.GetLinux() != nil {
|
||||||
stats := windowsStats.GetLinux()
|
stats := windowsStats.GetLinux()
|
||||||
printCgroupMetricsTable(w, stats)
|
printCgroupMetricsTable(w, stats)
|
||||||
@ -162,7 +160,6 @@ func printWindowsStats(w *tabwriter.Writer, windowsStats *wstats.Statistics) err
|
|||||||
if windowsStats.VM != nil {
|
if windowsStats.VM != nil {
|
||||||
printWindowsVMStatistics(w, windowsStats.VM)
|
printWindowsVMStatistics(w, windowsStats.VM)
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func printWindowsContainerStatistics(w *tabwriter.Writer, stats *wstats.WindowsContainerStatistics) {
|
func printWindowsContainerStatistics(w *tabwriter.Writer, stats *wstats.WindowsContainerStatistics) {
|
||||||
|
Loading…
Reference in New Issue
Block a user