public final class RamUsageTester
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RamUsageTester.Accumulator
An accumulator of object references.
|
| Constructor and Description |
|---|
RamUsageTester() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
humanSizeOf(java.lang.Object object)
Return a human-readable size of a given object.
|
static long |
sizeOf(java.lang.Object obj)
Same as calling
sizeOf(obj, DEFAULT_FILTER). |
static long |
sizeOf(java.lang.Object obj,
RamUsageTester.Accumulator accumulator)
Estimates the RAM usage by the given object.
|
public static long sizeOf(java.lang.Object obj,
RamUsageTester.Accumulator accumulator)
Resource Usage: This method internally uses a set of every object seen during traversals so it does allocate memory (it isn't side-effect free). After the method exits, this memory should be GCed.
public static long sizeOf(java.lang.Object obj)
sizeOf(obj, DEFAULT_FILTER).public static java.lang.String humanSizeOf(java.lang.Object object)
Copyright © 2000–2025 The Apache Software Foundation. All rights reserved.