Accountables

Helper methods for constructing nested resource descriptions and debugging RAM usage.

toString(Accountable} can be used to quickly debug the nested structure of any Accountable.

The namedAccountable and namedAccountables methods return type-safe, point-in-time snapshots of the provided resources.

Functions

Link copied to clipboard
fun namedAccountable(description: String, bytes: Long): Accountable

Returns an accountable with the provided description and bytes.

Augments an existing accountable with the provided description.

fun namedAccountable(description: String, children: MutableCollection<Accountable>, bytes: Long): Accountable

Returns an accountable with the provided description, children and bytes.

Link copied to clipboard

Converts a map of resources to a collection.

Link copied to clipboard

Returns a String description of an Accountable and any nested resources. This is intended for development and debugging.