Commit Graph

13 Commits

Author SHA1 Message Date
rusde 3154117dcf
Add tags to knative provided reconcile metrics (#1916)
* Add  tags to knative provided reconcile metrics

* Remove resource tag to reduce metric cardinality

* Removing unknown tags

* Update controller/testing/fake_stats_reporter.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-11-24 12:42:35 -08:00
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Victor Agababov 9c75061487
Make controller tests reentrant (#1671)
The stats tests were completely wonky checking some random things
and despite attempt to make them reentrant they weren't so.

So fix that \o/!
             |
             /
2020-08-31 14:06:15 -07:00
Victor Agababov c30ec2ffd4
Fix the flaky test. (#1632)
The test assumes the threads would schedule in particular way, but they don't.
But what we really care to check is that we thread in the proper RL and it works.
We don't need to check that underlying queue impl works, that's done in its own tests.
So just verify these two things.
2020-08-18 17:06:13 -07:00
Lance Liu e863db0344
Remove key in tags to reduce metrics count (#1494)
* Remove key in tags to reduce metrics count
Issue: https://github.com/knative/serving/issues/8609

Signed-off-by: Lance Liu <xuliuxl@cn.ibm.com>

* remove tag key for OpenCensus

Signed-off-by: Lance Liu <xuliuxl@cn.ibm.com>
2020-07-15 01:29:32 -07:00
Yanwei Guo 19b1d7b64d
Add a helper func to set a default metric config for unit tests (#1263)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* add a comment

* fix typo

* fix tests

* revert

* revert tests

* revert

* fix conflicts

* one more test file
2020-05-07 21:11:45 -07:00
Yanwei Guo 66c1551b08
Use helper func from metricstest package for the unit test (#1268)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* use metricstest package for test
2020-05-07 12:04:45 -07:00
Markus Thömmes d29cf98a77
Assorted linting fixes. (#1249)
* Remove unused code.

* Use raw strings to avoid escaping.

* Remove unneeded type conversions.

* Preallocate slices where possible.

* Use semantic equality in psbinding reconciler.
2020-04-28 08:20:51 -07:00
Matt Moore 2f853a1fdc Let the stats reporter tests run with -count=N (#486) 2019-06-23 20:12:02 -07:00
Yanwei Guo 060135fc89 Record metrics if config is nil (#315)
* record if nil

* some more comment

* some more comment

* return
2019-03-11 13:28:43 -07:00
Yanwei Guo b4a3bde045 Decide whether to record metrics according to current metrics config (#292)
* split and update

* bug fixed

* change the copyright year

* use fake metadata in tests

* exclude test coverage for gcp_metadata

* add record

* add tests

* revert 2019 and add a new var

* change documents

* address comment

* change line
2019-03-07 10:26:42 -08:00
Mustafa Demirhan 53b1235c2a Use different reporting periods based on the metrics backend (#182)
* Use different reporting periods based on the metrics backend. Original implementation was setting this value to 1 min to accommodate the minimum allowed value for stackdriver, but that is a sub optimal behavior for Prometheus. The change also allows operator to override the default values.

* Fix the units of reconciler latency from nano seconds to milliseconds.

* Address PR comments.

* Add better logging for reconciliation.

* Remove unnecessary lock in the UT.

* Address PR comments.
2018-12-04 15:16:25 -08:00
Mustafa Demirhan 6c3ae54dda Add reconciler metrics (#127)
* Add reconciler metrics for queue depth, reconcile count & reconcile latency.

* Update deps.

* Change queue depth measurement type to int64 from float64

* Address PR comments

* Add extra unit tests.

* Minor fixes.

* Address PR comments by adding extra documentation

* Add tests for testing/fake_stats_reporter

* Addressed PR comments.

* Address PR comments.
2018-10-22 14:34:30 -07:00