You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by rs...@apache.org on 2023/06/29 22:46:01 UTC
[trafficcontrol] 01/02: Revert "TM - Plugin Systems Stats Timestamp for SOH (#7551)"
This is an automated email from the ASF dual-hosted git repository.
rshah pushed a commit to branch revert-TM-changes-for-bandwidth-bug
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit 8deee08b3681d4889587f4a9c6c44c9a1782f36f
Author: Rima Shah <ri...@comcast.com>
AuthorDate: Thu Jun 29 16:44:18 2023 -0600
Revert "TM - Plugin Systems Stats Timestamp for SOH (#7551)"
This reverts commit a1bd413864feef5a7b87228cc80f087cf1680812.
---
traffic_monitor/cache/cache.go | 2 +-
traffic_monitor/cache/cache_test.go | 8 ++++----
traffic_monitor/cache/stats_over_http.json | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/traffic_monitor/cache/cache.go b/traffic_monitor/cache/cache.go
index 9bedd3494f..4d443c4088 100644
--- a/traffic_monitor/cache/cache.go
+++ b/traffic_monitor/cache/cache.go
@@ -307,7 +307,7 @@ func (handler Handler) Handle(id string, rdr io.Reader, format string, reqTime t
handler.resultChan <- result
return
}
- if val, ok := miscStats["plugin.system_stats.timestamp_ms"]; ok {
+ if val, ok := miscStats["current_time_epoch_ms"]; ok {
valString := fmt.Sprintf("%s", val)
valInt, valErr := strconv.ParseInt(valString, 10, 64)
if valErr != nil {
diff --git a/traffic_monitor/cache/cache_test.go b/traffic_monitor/cache/cache_test.go
index 93ed80b687..077592ffca 100644
--- a/traffic_monitor/cache/cache_test.go
+++ b/traffic_monitor/cache/cache_test.go
@@ -124,12 +124,12 @@ func TestParseAndDecode(t *testing.T) {
t.Errorf("empty miscStats structure")
}
- if val, ok := miscStats["plugin.system_stats.timestamp_ms"]; ok {
+ if val, ok := miscStats["current_time_epoch_ms"]; ok {
valString := fmt.Sprintf("%s", val)
- if valString != "1684784877939" {
- t.Errorf("unable to read `plugin.system_stats.timestamp_ms`")
+ if valString != "1684784878894" {
+ t.Errorf("unable to read `current_time_epoch_ms`")
}
} else {
- t.Errorf("plugin.system_stats.timestamp_ms field was not found in the json file")
+ t.Errorf("current_time_epoch_ms field was not found in the json file")
}
}
diff --git a/traffic_monitor/cache/stats_over_http.json b/traffic_monitor/cache/stats_over_http.json
index 979a2bac72..a7d8ed4b20 100644
--- a/traffic_monitor/cache/stats_over_http.json
+++ b/traffic_monitor/cache/stats_over_http.json
@@ -1,6 +1,5 @@
{
"global": {
- "plugin.system_stats.timestamp_ms": "1684784877939",
"proxy.process.http.completed_requests": 26220072200,
"proxy.process.http.total_incoming_connections": 770802777,
"proxy.process.http.total_client_connections": 770802777,
@@ -534,6 +533,7 @@
"plugin.system_stats.net.docker0.rx_length_errors": "0",
"proxy.process.cache.volume_0.span.offline": "0",
"proxy.process.cache.volume_0.span.online": "0",
+ "current_time_epoch_ms": "1684784878894",
"server": "10.0.0"
}
}