-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 new metric for the internal client-go cache size #117295
add new metric for the internal client-go cache size #117295
Conversation
/assign @enj @liggitt @logicalhan |
Is it useful to add counters for cache accesses (hit and miss) too? |
/lgtm |
@mouuii: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/hold that is indeed a great idea |
b870c3b
to
6e0d25f
Compare
added
/hold cancel added Ben suggestion, in addition record no-cacheable calls too |
6e0d25f
to
95dc301
Compare
@aojea if you are feeling particularly generous you could add an integration test that #117250 (comment):
At the end you could assert that we are indeed no longer leaking memory by checking the metrics :) Example integration test that asserts metrics: kubernetes/test/integration/certificates/duration_test.go Lines 51 to 65 in 1d27cbc
|
95dc301
to
edddb4c
Compare
bc74de7
to
e99fd61
Compare
e99fd61
to
349edd5
Compare
ok, Jordan is right ... again 😬
most probably is racing with other test 🤔 |
Yeah there are usually two ways around this. The first is to call |
d2ce753
to
c18c50a
Compare
@aojea you doubted Jordan?!! |
unrelated
lol, I never doubted it
I'm doing reset and moving the test to its own folder dedicated only to metrics, so we control the type of tests that are going to run together |
Add two new metrics to monitor the client-go logic that generate http.Transports for the clients. - rest_client_transport_cache_entries is a gauge metrics with the number of existin entries in the internal cache - rest_client_transport_create_calls_total is a counter that increments each time a new transport is created, storing the result of the operation needed to generate it: hit, miss or uncacheable Change-Id: I2d8bde25281153d8f8e8faa249385edde3c1cb39
c18c50a
to
3f3e1d5
Compare
/lgtm |
LGTM label has been added. Git tree hash: ce0b0d6c6870889043ac59a2cdefdb638cd1a411
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, dgrisonnet, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind feature
/sig api-machinery
/sig instrumentation