Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/cmd/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var (
cannotFindCache = "no cache named %s exists for service %s"
cannotFindViewCache = "no view cache named %s exists for service %s"
cacheSummary bool
showQueryParam bool
)

const (
Expand Down Expand Up @@ -1186,6 +1187,7 @@ func init() {
getCacheStoresCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
getCacheAccessCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
getCacheStorageCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
getCacheStorageCmd.Flags().BoolVarP(&showQueryParam, "query", "q", false, "show query details in full")
getCacheIndexesCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
getCachePartitionsCmd.Flags().StringVarP(&serviceName, serviceNameOption, serviceNameOptionShort, "", serviceNameDescription)
getCachePartitionsCmd.Flags().BoolVarP(&cacheSummary, "summary", "S", false, "show a cache summary")
Expand Down
7 changes: 6 additions & 1 deletion pkg/cmd/formatting.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,13 +1007,18 @@ func FormatCacheDetailsStorage(cacheDetails []config.CacheDetail) string {
var (
detailsCount = len(cacheDetails)
formattingFunction = getFormattingFunction()
maxLength = 40
)
if detailsCount == 0 {
return ""
}

if showQueryParam {
maxLength = 250
}

table := newFormattedTable().WithHeader(NodeIDColumn, "TIER", "LOCKS GRANTED", "LOCKS PENDING", "KEY LISTENERS",
"FILTER LISTENERS", "MAX QUERY MS", "MAX QUERY DESC").MaxLength(40).WithSortingColumn(NodeIDColumn)
"FILTER LISTENERS", "MAX QUERY MS", "MAX QUERY DESC").MaxLength(maxLength).WithSortingColumn(NodeIDColumn)

if OutputFormat == constants.WIDE {
table.AddHeaderColumns("NO OPT AVG", "OPT AVG", "INDEX SIZE", "INDEXING MILLIS")
Expand Down
Loading