torchtnt.utils.memory.RSSProfiler¶
-
class
torchtnt.utils.memory.
RSSProfiler
(interval: timedelta = datetime.timedelta(microseconds=100000))¶ A profiler that periodically measures RSS (resident set size) delta.
The baseline RSS is measured when the profiler is initialized. The RSS result is stored in the rss_deltas_bytes dict of the class.
-
interval
¶ The interval for measuring RSS. The default value is 100ms.
-
rss_deltas_bytes
¶ The RSS delta bytes stored as dict. Key is the name for the profiling round, value is the list of RSS delta bytes captured periodically.
-
__init__
(interval: timedelta = datetime.timedelta(microseconds=100000)) None ¶
Methods
__init__
([interval])profile
(name)Profile the current process and store the results with a custom name as the key. reset
()Resets the stored rss_deltas_bytes dict to empty. -