Skip to content

Commit 93c4fd5

Browse files
author
Tim Middleton
authored
Minor updates to cache-storage commands (#331)
1 parent a36f89c commit 93c4fd5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pkg/cmd/formatting.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,8 @@ func FormatCacheDetailsStorage(cacheDetails []config.CacheDetail) string {
10271027
"FILTER LISTENERS", "MAX QUERY MS", "MAX QUERY DESC").MaxLength(maxLength).WithSortingColumn(NodeIDColumn)
10281028

10291029
if OutputFormat == constants.WIDE {
1030-
table.AddHeaderColumns("NO OPT AVG", "OPT AVG", "INDEX SIZE", "INDEXING MILLIS")
1031-
table.WithAlignment(R, L, R, R, R, R, R, L, R, R, R, R)
1030+
table.AddHeaderColumns("NO OPT AVG", CountColumn, "OPT AVG", CountColumn, "INDEX SIZE", "INDEXING MILLIS")
1031+
table.WithAlignment(R, L, R, R, R, R, R, L, R, R, R, R, R, R)
10321032
} else {
10331033
table.WithAlignment(R, L, R, R, R, R, R, L)
10341034
}
@@ -1045,8 +1045,9 @@ func FormatCacheDetailsStorage(cacheDetails []config.CacheDetail) string {
10451045
formatLargeInteger(value.MaxQueryDurationMillis), value.MaxQueryDescription)
10461046
if OutputFormat == constants.WIDE {
10471047
table.AddColumnsToRow(formatFloat(float32(value.NonOptimizedQueryAverageMillis)),
1048-
formatFloat(float32(value.OptimizedQueryAverageMillis)),
1049-
formattingFunction(value.IndexTotalUnits), formatLargeInteger(value.IndexingTotalMillis))
1048+
formatLargeInteger(value.NonOptimizedQueryCount), formatFloat(float32(value.OptimizedQueryAverageMillis)),
1049+
formatLargeInteger(value.OptimizedQueryCount), formattingFunction(value.IndexTotalUnits),
1050+
formatLargeInteger(value.IndexingTotalMillis))
10501051
}
10511052
}
10521053

pkg/config/config_helper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ type CacheDetail struct {
620620
MaxQueryDurationMillis int64 `json:"maxQueryDurationMillis"`
621621
MaxQueryDescription string `json:"maxQueryDescription"`
622622
NonOptimizedQueryAverageMillis float64 `json:"nonOptimizedQueryAverageMillis"`
623+
NonOptimizedQueryCount int64 `json:"nonOptimizedQueryCount"`
623624
OptimizedQueryAverageMillis float64 `json:"optimizedQueryAverageMillis"`
625+
OptimizedQueryCount int64 `json:"optimizedQueryCount"`
624626
IndexTotalUnits int64 `json:"indexTotalUnits"`
625627
IndexingTotalMillis int64 `json:"indexingTotalMillis"`
626628
IndexInfo []string `json:"indexInfo"`

0 commit comments

Comments
 (0)