local_object_size
Storage capacity measurement for locally-stored objects.
LocalObjectSize
Bases: Measurement
Measure the size of a locally-stored object. Calculates the results by default in bytes.
Source code in mlte/measurement/storage/local_object_size.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
__call__(path, unit=Units.byte)
Compute the size of the object at path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
The path to the object |
required |
unit
|
Unit
|
The unit to return the size in, defaults to byte (Units.byte). |
byte
|
Returns:
| Type | Description |
|---|---|
Real
|
The size of the object, in bytes |
Source code in mlte/measurement/storage/local_object_size.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
__init__(identifier=None)
Initialize a new LocalObjectSize measurement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
Optional[str]
|
A unique identifier for the measurement |
None
|
Source code in mlte/measurement/storage/local_object_size.py
14 15 16 17 18 19 20 | |