Skip to content

Commit 9131df7

Browse files
Merge pull request #38 from RelationalAI/ag-memory-usage
Expose memory usage metrics from object_store_ffi
2 parents 79555f0 + 5a07410 commit 9131df7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "RustyObjectStore"
22
uuid = "1b5eed3d-1f46-4baa-87f3-a4a892b23610"
3-
version = "0.6.1"
3+
version = "0.6.5"
44

55
[deps]
66
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
@@ -16,7 +16,7 @@ ReTestItems = "1"
1616
Sockets = "1"
1717
Test = "1"
1818
julia = "1.8"
19-
object_store_ffi_jll = "0.6.0"
19+
object_store_ffi_jll = "0.6.5"
2020

2121
[extras]
2222
CloudBase = "85eb1798-d7c4-4918-bb13-c944d38e27ed"

src/RustyObjectStore.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export StaticConfig, ClientOptions, Config, AzureConfig, AWSConfig
55
export status_code, is_connection, is_timeout, is_early_eof, is_unknown, is_parse_url
66
export get_object_stream, ReadStream, finish!
77
export put_object_stream, WriteStream, cancel!, shutdown!
8+
export current_metrics
89

910
using Base.Libc.Libdl: dlext
1011
using Base: @kwdef, @lock
@@ -1325,4 +1326,12 @@ function _unsafe_write(stream::WriteStream, input::Ptr{UInt8}, nbytes::Int; flus
13251326
return Int(response.length)
13261327
end
13271328

1329+
struct Metrics
1330+
live_bytes::Int64
1331+
end
1332+
1333+
function current_metrics()
1334+
return @ccall rust_lib.current_metrics()::Metrics
1335+
end
1336+
13281337
end # module

0 commit comments

Comments
 (0)