Skip to content

Commit

Permalink
Change InMemoryMavenPomCache nickname's name and move it to the cache…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
kmccarp committed Sep 12, 2023
1 parent b4602a5 commit f844227
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public InMemoryMavenPomCache() {
);
}

public InMemoryMavenPomCache(String name,
public InMemoryMavenPomCache(String cacheNickname,
Cache<ResolvedGroupArtifactVersion, Optional<Pom>> pomCache,
Cache<MetadataKey, Optional<MavenMetadata>> mavenMetadataCache,
Cache<MavenRepository, Optional<MavenRepository>> repositoryCache,
Expand All @@ -69,10 +69,10 @@ public InMemoryMavenPomCache(String name,
this.repositoryCache = repositoryCache;
this.dependencyCache = dependencyCache;

CaffeineCacheMetrics.monitor(Metrics.globalRegistry, pomCache, "Maven POMs", "name", name);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, mavenMetadataCache, "Maven metadata", "name", name);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, repositoryCache, "Maven repositories", "name", name);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, dependencyCache, "Resolved dependency POMs", "name", name);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, pomCache, "Maven POMs - " + cacheNickname);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, mavenMetadataCache, "Maven metadata - " + cacheNickname);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, repositoryCache, "Maven repositories - " + cacheNickname);
CaffeineCacheMetrics.monitor(Metrics.globalRegistry, dependencyCache, "Resolved dependency POMs - " + cacheNickname);
}

public InMemoryMavenPomCache(Cache<ResolvedGroupArtifactVersion, Optional<Pom>> pomCache,
Expand Down

0 comments on commit f844227

Please sign in to comment.