Commit Graph

4 Commits

Author SHA1 Message Date
Max Leonard Inden 183c7988fb
main_test.go: Introduce overarching benchmark test
This patch adds a simple go benchmark test, injecting Kubernetes objects
and simulating scrape requests. It uses the Kubernetes client-go fake
client. Alongside comes some refactoring of each collectors structure
using informer factories to be compatible with the fake client.

The patch lays the groundwork to make future performance optimizations
comparable with past versions.

How to run test:
`go test -race -bench  . -memprofile=mem.out -cpuprofile=cpu.out`
2018-08-17 11:52:02 +02:00
zouyee 638f33c097 using define variables instead 2018-06-08 17:39:05 +08:00
Andy Xie 14ba135253 add generic pod resource request and limit 2018-05-17 13:20:53 +08:00
Andy Xie fef896fa62 refactor to toward kubernetes way 2018-04-27 22:23:12 +08:00