Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional BlobCacheMetrics, expose BlobCacheMetrics via SharedBlobCacheService #111730

Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5dacb69
Add callback for copy-to-cache metrics, additional BlobCacheMetrics
nicktindall Aug 9, 2024
c4b6487
Update docs/changelog/111730.yaml
nicktindall Aug 9, 2024
ad68e99
Shorten metric names (exceeded max length)
nicktindall Aug 9, 2024
181b958
Align attribute key name
nicktindall Aug 9, 2024
07dfc5a
Remove callback from method not used by stateless
nicktindall Aug 9, 2024
9c8ee42
Add CachePopulationReason.CacheMiss
nicktindall Aug 9, 2024
752b1ef
Revert "Remove callback from method not used by stateless"
nicktindall Aug 9, 2024
c0189f4
NO_OP -> NOOP
nicktindall Aug 9, 2024
7c34720
Remove metrics from copyToCacheFileAligned not used
nicktindall Aug 12, 2024
69d58ec
Merge remote-tracking branch 'origin/main' into feature/ES-9067_expos…
nicktindall Aug 12, 2024
c823f75
Add todo
nicktindall Aug 12, 2024
10a32f6
Protect against divide-by-zero
nicktindall Aug 12, 2024
439152c
Remove unused CachePopulationReason#LoadCommit
nicktindall Aug 12, 2024
f8dfabc
Merge branch 'main' into feature/ES-9067_expose_cache_copy_metrics
nicktindall Aug 13, 2024
5c38dbf
Simplify blob-cache population notifications, extract interface
nicktindall Aug 13, 2024
d504094
Add time/bytes counter, make throughput MB/s
nicktindall Aug 13, 2024
c8e6d28
Fix metric names
nicktindall Aug 13, 2024
03a8f1d
Fix javadocs
nicktindall Aug 13, 2024
47a0a35
Be more defensive when handling metrics
nicktindall Aug 13, 2024
a71d70b
Don't notify when no bytes were copied
nicktindall Aug 13, 2024
95d2e5f
Add test for SharedBytes#copyToCacheFileAligned
nicktindall Aug 14, 2024
e18a283
Fix comment, ensure room for at least a byte
nicktindall Aug 14, 2024
168efe1
Use strings for metric values
nicktindall Aug 14, 2024
f60d341
Take shard ID as a string, to reduce string concatenation
nicktindall Aug 14, 2024
c938e89
Remove BlobCachePopulationListener
nicktindall Aug 15, 2024
8f5967a
Add source to BlobCacheMetrics
nicktindall Aug 15, 2024
45fb734
Add test, extract CachePopulationSource
nicktindall Aug 15, 2024
71c0b2c
Expose BlobCacheMetrics from SharedBlobCacheService
nicktindall Aug 15, 2024
91405f2
Fix test name
nicktindall Aug 15, 2024
03a0140
Delete docs/changelog/111730.yaml
nicktindall Aug 15, 2024
df97c59
Improve metric and attribute names
nicktindall Aug 15, 2024
8295d35
Randomise BlobCacheMetricsTests
nicktindall Aug 15, 2024
a903534
De-duplicate
nicktindall Aug 15, 2024
e8edc63
Fix spotless
nicktindall Aug 15, 2024
81e2776
Add Unknown CachePopulationSource
nicktindall Aug 15, 2024
b17f316
Apply feedback
nicktindall Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
NO_OP -> NOOP
nicktindall committed Aug 9, 2024
commit c0189f4afc21bb3d8c7651b93d464a1995cb8972
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ public static void copyToCacheFileAligned(

public interface CacheCopyMetricsConsumer {

CacheCopyMetricsConsumer NO_OP = (br, rtn, bw, wtn, et) -> {};
CacheCopyMetricsConsumer NOOP = (br, rtn, bw, wtn, et) -> {};

/**
* Notify the times taken to read from the input stream and write to the destination
Original file line number Diff line number Diff line change
@@ -167,7 +167,7 @@ private void readWithoutBlobCacheSlow(ByteBuffer b, long position, int length) t
len,
progressUpdater,
writeBuffer.get().clear(),
SharedBytes.CacheCopyMetricsConsumer.NO_OP
SharedBytes.CacheCopyMetricsConsumer.NOOP
);
final long endTimeNanos = stats.currentTimeNanos();
stats.addCachedBytesWritten(len, endTimeNanos - startTimeNanos);