Skip to content

Commit

Permalink
add plasma java client metrics api (apache#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jikunshang committed Mar 22, 2021
1 parent 104e918 commit 608ee97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@ default byte[] get(byte[] objectId, int timeoutMs, boolean isMetadata) {
* List all objects in the PlasmaStore.
*/
List<byte[]> list();

/**
* Get metrics in the PlasmaStore.
*/
int metrics(long[] metrics);
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,14 @@ public void delete(byte[] objectId) {
public boolean contains(byte[] objectId) {
return PlasmaClientJNI.contains(conn, objectId);
}

/**
* Get metrics in the PlasmaStore.
*
* @param metrics used to return metrics, array size is 4, elements are: total memory size,
* used memory size, total external size, used external size.
*/
public int metrics(long[] metrics) {
return PlasmaClientJNI.metrics(conn, metrics);
}
}

0 comments on commit 608ee97

Please sign in to comment.