Commit Graph

10 Commits

Author SHA1 Message Date
wojtekt b898581360 Migrate to k8s.io/utils/clock in apiserver
Kubernetes-commit: 859a98c0358610e2c127cd2fba1be601ca975188
2021-09-14 20:36:07 +02:00
Mike Danese 8d1e73feab inline GC in expiring cache
This allows us to drop the background goroutine with negligable
difference in performance.

Kubernetes-commit: d16dde36a3edf5cdb89c5d5b56d4e3c9af849c1c
2019-11-15 17:04:28 -08:00
Mike Danese 0326ed9810 migrate token cache to cache.Expiring
Kubernetes-commit: 3f194d5b413daeba93063f4610b9951069eaf13c
2019-11-06 16:23:21 -08:00
Mike Danese 61dd52533e adjust token cache benchmarks to get more accurate behavior
b.N is adjusted by pkg/testing using an internal heuristic:

> The benchmark function must run the target code b.N times. During
> benchmark execution, b.N is adjusted until the benchmark function
> lasts long enough to be timed reliably.

Using b.N to seed other parameters makes the benchmark behavior
difficult to reason about. Before this change, thread count in the
CachedTokenAuthenticator benchmark is always 5000, and batch size is
almost always 1 when I run this locally. SimpleCache and StripedCache
benchmarks had similarly strange scaling.

After modifying CachedTokenAuthenticator to only adjust iterations based
on b.N, the batch chan was an point of contention and I wasn't able to
see any significant CPU consumption. This was fixed by using
ParallelBench to do the batching, rather than using a chan.

Kubernetes-commit: 43d34882c9b3612d933b97b6e470fd8d36fe492b
2019-10-26 14:12:41 -07:00
Mike Danese 44b9fc84ab migrate callers to g/g/uuid
Kubernetes-commit: a4ca9e6c93e45b4a97e7d04df37362299088f64a
2019-11-04 23:15:20 -08:00
Ted Yu 7e547519cf Add note on the role of BenchmarkSimpleCache
Kubernetes-commit: dd48a022c063e9f507ff62e1796a273d38036cb4
2019-09-11 14:39:57 -07:00
Mike Danese 908a04653f make token cache include audience in hash key
Kubernetes-commit: 809f278b032103cd24fcbb5ea2196c6c7caa6f63
2018-10-16 10:02:01 -07:00
Mike Danese 2ced48ac6e rebase authenticators onto new interface.
Kubernetes-commit: e5227216c0796d725c695e36cfc1d54e7631d3a6
2018-10-15 15:17:36 -07:00
Wang Guoliang 32fe314a1e fix some syntax related errors
Kubernetes-commit: d065157dd74fa02eec87f5849528b079a3736c3d
2018-02-11 19:50:49 +08:00
Jordan Liggitt 80d2e2dae5 Add token cache component
Kubernetes-commit: 1670ba58d5425caecbde8871b07521e9e5888f78
2017-08-29 13:15:24 +00:00