Learn R Programming

shard (version 0.1.0)

mem_report: Memory Usage Report

Description

Generates a report of memory usage across all workers in the pool.

Usage

mem_report(pool = NULL)

Value

An S3 object of class shard_report with type "memory"

containing:

  • type: "memory"

  • timestamp: When the report was generated

  • pool_active: Whether a pool exists

  • n_workers: Number of workers

  • rss_limit: RSS limit per worker (bytes)

  • total_rss: Sum of RSS across all workers

  • peak_rss: Highest RSS among workers

  • mean_rss: Mean RSS across workers

  • workers: Per-worker RSS details

Arguments

pool

Optional. A shard_pool object. If NULL, uses the current pool.

Examples

Run this code
# \donttest{
p <- pool_create(2)
mem_report(p)
pool_stop(p)
# }

Run the code above in your browser using DataLab