forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added overall CacheStatsResponse object packaging all 5 metrics
Signed-off-by: Peter Alfonsi <[email protected]>
- Loading branch information
Peter Alfonsi
committed
Feb 14, 2024
1 parent
6059680
commit 7f5a455
Showing
6 changed files
with
97 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
server/src/main/java/org/opensearch/common/cache/stats/CacheStatsBase.java
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
server/src/main/java/org/opensearch/common/cache/stats/CacheStatsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.common.cache.stats; | ||
|
||
/** | ||
* A class containing the 5 metrics tracked by a CacheStats object. | ||
*/ | ||
public class CacheStatsResponse { // TODO: Make this extend ToXContent. | ||
public final long hits; | ||
public final long misses; | ||
public final long evictions; | ||
public final long memorySize; | ||
public final long entries; | ||
|
||
public CacheStatsResponse(long hits, long misses, long evictions, long memorySize, long entries) { | ||
this.hits = hits; | ||
this.misses = misses; | ||
this.evictions = evictions; | ||
this.memorySize = memorySize; | ||
this.entries = entries; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters