Skip to content

Commit b921bb0

Browse files
committed
Adapt to new metrics format
1 parent dd58fb5 commit b921bb0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/RustyObjectStore.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,12 +2004,11 @@ function invalidate_config(conf::Option{AbstractConfig}=nothing)
20042004
end
20052005
end
20062006

2007-
struct Metrics
2008-
live_bytes::Int64
2009-
end
2010-
20112007
function current_metrics()
2012-
return @ccall rust_lib.current_metrics()::Metrics
2008+
metrics_ptr = @ccall rust_lib.current_metrics()::Ptr{Cchar}
2009+
metrics_string = unsafe_string(metrics_ptr)
2010+
metrics = JSON3.read(metrics_string)
2011+
return metrics
20132012
end
20142013

20152014
module Test

0 commit comments

Comments
 (0)