Skip to content

Commit

Permalink
Human-readable memory formats at both start and end
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Apr 11, 2023
1 parent 244e071 commit 30b6268
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions tests/test.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ run <- function() {
)
print("memory used at start:")
print(lobstr::mem_used())
print("dispatcher memory at start:")
handle <- ps::ps_handle(dispatcher)
memory_info <- ps::ps_memory_info(handle)
print(memory_info)
print("dispatcher memory human-readable format at start:")
print(lobstr:::format.lobstr_bytes(memory_info))
print("server memory at start:")
h <- ps::ps_handle(server$get_pid())
memory_info <- ps::ps_memory_info(h)
print(memory_info)
print("server memory human-readable format at start:")
print(lobstr:::format.lobstr_bytes(memory_info))
on.exit({
print(paste0(Sys.time(), ": time at exit"))
print("memory used at exit:")
Expand All @@ -35,16 +47,16 @@ run <- function() {
print("dispatcher running?")
handle <- ps::ps_handle(dispatcher)
print(ps::ps_is_running(handle))
print("dispatcher memory:")
print("dispatcher memory at end:")
memory_info <- ps::ps_memory_info(handle)
print(memory_info)
print("dispatcher memory human-readable format:")
print("dispatcher memory human-readable format at end:")
print(lobstr:::format.lobstr_bytes(memory_info))
print("server memory:")
print("server memory at end:")
h <- ps::ps_handle(server$get_pid())
memory_info <- ps::ps_memory_info(h)
print(memory_info)
print("server memory human-readable format:")
print("server memory human-readable format at end:")
print(lobstr:::format.lobstr_bytes(memory_info))
daemons(n = 0L, .compute = "profile")
})
Expand Down

0 comments on commit 30b6268

Please sign in to comment.