Commit Graph

9 Commits

Author SHA1 Message Date
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