Skip to content

Track total memory used by the graph #864

Description

@amomchilov

There are several popular crates that let you check the transitive size of an entire object graph, e.g.:

  1. https://crates.io/crates/allocative
  2. https://crates.io/crates/deepsize
  3. https://crates.io/crates/get-size2

We should apply one of these to be able to query memory statistics about the whole index.

Then, we can implement the dsize function, to expose this memory usage to Ruby, so it can be queried e.g. via ObjectSpace.memsize_of.

Note

Whichever crate we end up using, we should make sure it can deal with shared objects (like Rc/Arc) and doesn't double-count them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions