@Test void metrics() { final MeterRegistry meterRegistry = PrometheusMeterRegistries.newRegistry(); final Repository repo = newCachingRepo(meterRegistry); final Map<String, Double> meters = MoreMeters.measureAll(meterRegistry); assertThat(meters).containsKeys("cache.load#count{cache=repository,result=success}"); assertThat(repo.normalizeNow(HEAD)).isNotEqualTo(""); }
@Override public Revision normalizeNow(Revision revision) { return repo.normalizeNow(revision); }
CachingRepository implements Repository { @Override public Revision normalizeNow(Revision revision) { return repo.normalizeNow(revision); } }
CachingRepository implements Repository { @Override public Revision normalizeNow(Revision revision) { return repo.normalizeNow(revision); } CachingRepository(Repository repo, RepositoryCache cache); }
CachingRepository implements Repository { @Override public Revision normalizeNow(Revision revision) { return repo.normalizeNow(revision); } CachingRepository(Repository repo, RepositoryCache cache); @Override long creationTimeMillis(); @Override Author author(); @Override CompletableFuture<Entry<T>> getOrNull(Revision revision, Query<T> query); @Override CompletableFuture<Map<String, Entry<?>>> find(Revision revision, String pathPattern,
                                                         Map<FindOption<?>, ?> options); @Override CompletableFuture<List<Commit>> history(Revision from, Revision to,
                                                   String pathPattern, int maxCommits); @Override CompletableFuture<Change<?>> diff(Revision from, Revision to, Query<?> query); @Override CompletableFuture<Map<String, Change<?>>> diff(Revision from, Revision to, String pathPattern); @Override CompletableFuture<Revision> findLatestRevision(Revision lastKnownRevision, String pathPattern); @Override CompletableFuture<Revision> watch(Revision lastKnownRevision, String pathPattern); @Override Project parent(); @Override String name(); @Override Revision normalizeNow(Revision revision); @Override RevisionRange normalizeNow(Revision from, Revision to); @Override CompletableFuture<Map<String, Change<?>>> previewDiff(Revision baseRevision,
                                                                 Iterable<Change<?>> changes); @Override CompletableFuture<Revision> commit(Revision baseRevision, long commitTimeMillis,
                                              Author author, String summary, String detail, Markup markup,
                                              Iterable<Change<?>> changes); @Override CompletableFuture<MergedEntry<T>> mergeFiles(Revision revision, MergeQuery<T> query); @Override String toString(); }
CachingRepository implements Repository { @Override public Revision normalizeNow(Revision revision) { return repo.normalizeNow(revision); } CachingRepository(Repository repo, RepositoryCache cache); @Override long creationTimeMillis(); @Override Author author(); @Override CompletableFuture<Entry<T>> getOrNull(Revision revision, Query<T> query); @Override CompletableFuture<Map<String, Entry<?>>> find(Revision revision, String pathPattern,
                                                         Map<FindOption<?>, ?> options); @Override CompletableFuture<List<Commit>> history(Revision from, Revision to,
                                                   String pathPattern, int maxCommits); @Override CompletableFuture<Change<?>> diff(Revision from, Revision to, Query<?> query); @Override CompletableFuture<Map<String, Change<?>>> diff(Revision from, Revision to, String pathPattern); @Override CompletableFuture<Revision> findLatestRevision(Revision lastKnownRevision, String pathPattern); @Override CompletableFuture<Revision> watch(Revision lastKnownRevision, String pathPattern); @Override Project parent(); @Override String name(); @Override Revision normalizeNow(Revision revision); @Override RevisionRange normalizeNow(Revision from, Revision to); @Override CompletableFuture<Map<String, Change<?>>> previewDiff(Revision baseRevision,
                                                                 Iterable<Change<?>> changes); @Override CompletableFuture<Revision> commit(Revision baseRevision, long commitTimeMillis,
                                              Author author, String summary, String detail, Markup markup,
                                              Iterable<Change<?>> changes); @Override CompletableFuture<MergedEntry<T>> mergeFiles(Revision revision, MergeQuery<T> query); @Override String toString();  }