Rather than polling DescribeGraph every scrape_interval seconds, just call it once at startup, cache the state, then subscribe to graph notifications and update the cached state.
Rationale: DescribeGraph is an expensive call, so this optimization should reduce memory usage.
Rather than polling
DescribeGraph
everyscrape_interval
seconds, just call it once at startup, cache the state, then subscribe to graph notifications and update the cached state.Rationale:
DescribeGraph
is an expensive call, so this optimization should reduce memory usage.