Skip to content

Commit 487b012

Browse files
[enhance] change default metrics collect format (#1707)
* [enhance] change default metrics collect format - to parse scientific notation well * Update pkg/metricscollector/v1beta1/common/const.go Co-authored-by: Andrey Velichkevich <[email protected]> Co-authored-by: Andrey Velichkevich <[email protected]>
1 parent 6de09d7 commit 487b012

File tree

1 file changed

+5
-1
lines changed
  • pkg/metricscollector/v1beta1/common

1 file changed

+5
-1
lines changed

pkg/metricscollector/v1beta1/common/const.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ const (
4040
// Metrics must be printed this way
4141
// loss=0.3
4242
// accuracy=0.98
43-
DefaultFilter = `([\w|-]+)\s*=\s*((-?\d+)(\.\d+)?)`
43+
// Score=-7.53e-05
44+
// Score=-7.53e+05
45+
// Score=1E0
46+
// Score=1.23E10
47+
DefaultFilter = `([\w|-]+)\s*=\s*([+-]?\d(\.\d+)?([Ee][+-]?\d+)?)`
4448

4549
// TODO (andreyvelich): Do we need to maintain 2 names? Should we leave only 1?
4650
MetricCollectorContainerName = "metrics-collector"

0 commit comments

Comments
 (0)