Commit Graph

5 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
Fabian Reinartz 53ddc0e346 Rework node metrics
This commit reworks node metrics in the same manner as deployment
metrics.
The node states are broken out into one time series for each possible
conditional state. One constant metric holds textual meta information
about cluster nodes.
2016-09-07 10:31:28 +02:00
Frederic Branczyk ed505ccd41 Container restart metric (#9)
* Rework container restart metric

This commit reworks the container restart metric in the same manner as
deployment metrics. The format remains unchanged to the previous format
as in one metric per container via labels.

* Normalize expected string representation

To be able to compare strings easier when a failure occurs, remove empty
lines and trim whitespace for each line of the expected metrics string.
2016-09-07 10:20:31 +02:00
Fabian Reinartz b15680d96d Rework deployment metrics (#6)
* Update prometheus client vendoring

* Rework deployment metrics

This change extracts the deployment metrics into their own
deployment collector. The metrics are collected synchronously with
each scrape rather than every 10 seconds.

The `deployment` label replaces the `name` label to avoid name
collisions further up in the monitoring chain.
2016-09-01 15:58:22 -07:00
Sam Ghods 795d6c51e7 Create kube-state-metrics 2016-05-06 14:36:03 -07:00