-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(kubernetes): Move pod metrics to use KubernetesCacheData (#3830
) * refactor(kubernetes): Process pod metrics outside of parallel loop We currently fetch pod metrics in a parallel stream because most of the time is spent in IO waiting for kubectl to return the metrics. We're also processing the metrics in parallel, which blocks moving to the new KubernetesCacheData object as it is not threadsafe. Rather than make it threadsafe (which would add some overhead and complexity) just move the processing of the received metrics out of the parallel stream and into a sequential stream. We'll still fetch the metrics in a parallel stream, it's just the relatively fast post-processing that will now be sequential. * refactor(kubernetes): Move pod metrics to use KubernetesCacheData Remove invertRelationships and dedupCacheData from the KubernetesMetricCachingAgent by having it use KubernetesCacheData. This removes that last two uses of these functions, which can now be deleted. * perf(kubernetes): Replace stratify function After generating a Collection<CacheData> of kubernetes cache data, we always then group this data by the CacheData's group and perform some filtering of the data. The grouping and filtering requires parsing the cache key again, so it would be more efficient if we did this as part of KubernetesCacheData before writing out the CacheData entries.
- Loading branch information
Showing
9 changed files
with
114 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.