You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/05/07 10:10:09 UTC

[trafficserver] 02/03: Removed more of proxy.node metrics for ratios, useless

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 9972bdc633d2d5af892d4f2d5f53a55ad3b2b503
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu May 3 14:46:03 2018 -0600

    Removed more of proxy.node metrics for ratios, useless
---
 doc/admin-guide/files/metrics.config.en.rst        | 24 -------------------
 .../monitoring/statistics/core/bandwidth.en.rst    | 11 ---------
 .../monitoring/statistics/core/cache.en.rst        | 10 --------
 .../monitoring/statistics/core/hostdb.en.rst       |  7 ------
 .../monitoring/statistics/core/bandwidth.en.po     |  6 -----
 .../monitoring/statistics/core/cache.en.po         | 12 ----------
 .../monitoring/statistics/core/hostdb.en.po        |  6 -----
 mgmt/api/APITestCliRemote.cc                       |  5 ----
 plugins/experimental/epic/epic.cc                  |  3 ---
 proxy/config/metrics.config.default                | 27 ----------------------
 10 files changed, 111 deletions(-)

diff --git a/doc/admin-guide/files/metrics.config.en.rst b/doc/admin-guide/files/metrics.config.en.rst
index b90a0b1..e297f16 100644
--- a/doc/admin-guide/files/metrics.config.en.rst
+++ b/doc/admin-guide/files/metrics.config.en.rst
@@ -129,30 +129,6 @@ the value. In this case, the function body is just a ``return`` of the named,
 underlying process statistic. No calculations, aggregates, or other processing
 are performed.
 
-Converting a metric to a ratio
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Using a very simplified version of the |TS| cache hit reporting, we can
-demonstrate taking a metric which expresses the occurrence of one type of event
-within a set of possibilities and converting its absolute value into a ratio
-of that set's total.
-
-In this example, we assume we have three cache hit states (misses, hits, and
-revalidates) and they are tracked in the metrics ``proxy.node.cache.<state>``.
-These are not the real metric names in |TS|, and there are much finer grained
-reporting states available, but we'll use these for brevity.
-
-.. code:: lua
-
-    float 'proxy.node.cache.hits_ratio' [[
-      return
-        proxy.node.cache.hits /
-        ( proxy.node.cache.hits +
-          proxy.node.cache.misses +
-          proxy.node.cache.revalidates
-        )
-    ]]
-
 Further Reading
 ===============
 
diff --git a/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst b/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
index 6466926..0b5113b 100644
--- a/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/bandwidth.en.rst
@@ -22,17 +22,6 @@
 Bandwidth and Transfer
 **********************
 
-.. ts:stat:: global proxy.node.bandwidth_hit_ratio float
-   :type: derivative
-   :units: ratio
-
-   The difference of :ts:stat:`proxy.node.user_agent_total_bytes` and
-   :ts:stat:`proxy.node.origin_server_total_bytes`, divided by
-   :ts:stat:`proxy.node.user_agent_total_bytes`.
-
-   Represents the ratio of bytes served to user agents which were satisfied by
-   cache hits, since statistics collection began.
-
 .. ts:stat:: global proxy.process.http.throttled_proxy_only integer
 .. ts:stat:: global proxy.process.http.user_agent_request_document_total_size integer
    :type: counter
diff --git a/doc/admin-guide/monitoring/statistics/core/cache.en.rst b/doc/admin-guide/monitoring/statistics/core/cache.en.rst
index c6b49e1..c41591a 100644
--- a/doc/admin-guide/monitoring/statistics/core/cache.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/cache.en.rst
@@ -27,16 +27,6 @@ Cache
 
    Represents the number of documents currently residing in the cache.
 
-.. ts:stat:: global proxy.node.cache_hit_mem_ratio float
-
-   Represents the ratio of cache lookups which have been satisfied by the
-   in-memory cache since statistics collection began.
-
-.. ts:stat:: global proxy.node.cache_hit_ratio float
-
-   Represents the ratio of cache lookups which have been satisfied by either the
-   in-memory cache or the on-disk cache since statistics collection began.
-
 .. ts:stat:: global proxy.node.cache_total_hits counter
 
    Represents the total number of cache lookups which have been satisfied by
diff --git a/doc/admin-guide/monitoring/statistics/core/hostdb.en.rst b/doc/admin-guide/monitoring/statistics/core/hostdb.en.rst
index 1249296..4bef3f6 100644
--- a/doc/admin-guide/monitoring/statistics/core/hostdb.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/hostdb.en.rst
@@ -27,13 +27,6 @@ health checks. The statistics documented here can help to ensure that your |TS|
 instances are not spending an unreasonable amount of timing resolving your
 origin servers' hostnames prior to object revalidation or retrieval.
 
-.. ts:stat:: global proxy.node.hostdb.hit_ratio float
-   :type: derivative
-   :units: ratio
-
-   Represents the ratio of origin server name resolutions which were satisfied
-   by the HostDB lookup cache since statistics collection began.
-
 .. ts:stat:: global proxy.process.hostdb.bytes integer
    :type: counter
    :units: bytes
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/bandwidth.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/bandwidth.en.po
index 0f84ad9..519a711 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/bandwidth.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/bandwidth.en.po
@@ -38,12 +38,6 @@ msgid ""
 "cache hits, over the previous 10 seconds,"
 msgstr ""
 
-#: ../../admin-guide/monitoring/statistics/core/bandwidth.en.rst:47
-msgid ""
-"The percentage vaue of :ts:stat:`proxy.node.bandwidth_hit_ratio` converted "
-"to an integer."
-msgstr ""
-
 #: ../../admin-guide/monitoring/statistics/core/bandwidth.en.rst:54
 msgid ""
 "The difference of :ts:stat:`proxy.node.user_agent_total_bytes` and :ts:stat:"
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/cache.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/cache.en.po
index b0b615c..783754d 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/cache.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/cache.en.po
@@ -64,12 +64,6 @@ msgid ""
 "memory cache since statistics collection began."
 msgstr ""
 
-#: ../../admin-guide/monitoring/statistics/core/cache.en.rst:69
-msgid ""
-"The value of :ts:stat:`proxy.node.cache_hit_mem_ratio` converted to an "
-"integer percent."
-msgstr ""
-
 #: ../../admin-guide/monitoring/statistics/core/cache.en.rst:74
 msgid ""
 "Represents the ratio of cache lookups over the previous 10 seconds which "
@@ -83,12 +77,6 @@ msgid ""
 "the in-memory cache or the on-disk cache since statistics collection began."
 msgstr ""
 
-#: ../../admin-guide/monitoring/statistics/core/cache.en.rst:90
-msgid ""
-"The value of :ts:stat:`proxy.node.cache_hit_ratio` converted to an integer "
-"percent."
-msgstr ""
-
 #: ../../admin-guide/monitoring/statistics/core/cache.en.rst:95
 msgid ""
 "Represents the percentage of allocated cache space which is not occupied by "
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/hostdb.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/hostdb.en.po
index c866f18..b293485 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/hostdb.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/statistics/core/hostdb.en.po
@@ -52,12 +52,6 @@ msgid ""
 "by the HostDB lookup cache since statistics collection began."
 msgstr ""
 
-#: ../../admin-guide/monitoring/statistics/core/hostdb.en.rst:48
-msgid ""
-"The value of :ts:stat:`proxy.node.hostdb.hit_ratio` converted to an integer "
-"percent."
-msgstr ""
-
 #: ../../admin-guide/monitoring/statistics/core/hostdb.en.rst:54
 msgid ""
 "Represents the number of origin server name resolutions which were "
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 8477b6e..2103ae5 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -869,11 +869,6 @@ set_stats()
   TSRecordSetInt("proxy.process.http.current_server_connections", 100, &action);
   TSRecordSetInt("proxy.process.http.current_server_transactions", 100, &action);
 
-  TSRecordSetFloat("proxy.node.bandwidth_hit_ratio", 110, &action);
-  TSRecordSetFloat("proxy.node.hostdb.hit_ratio", 110, &action);
-  TSRecordSetFloat("proxy.node.cache_hit_ratio", 110, &action);
-  TSRecordSetFloat("proxy.node.cache_hit_mem_ratio", 110, &action);
-
   TSRecordSetInt("proxy.node.proxy_running", 110, &action);
   TSRecordSetInt("proxy.node.proxy_running", 110, &action);
 }
diff --git a/plugins/experimental/epic/epic.cc b/plugins/experimental/epic/epic.cc
index b7d5843..a0b9cea 100644
--- a/plugins/experimental/epic/epic.cc
+++ b/plugins/experimental/epic/epic.cc
@@ -56,15 +56,12 @@ static char *epic_prefix;
 // names like proxy.process.cache.volume_XX.*.active
 
 static const std::set<std::string> epic_gauges = {
-  "proxy.node.cache_hit_mem_ratio",
-  "proxy.node.cache_hit_ratio",
   "proxy.node.config.reconfigure_required",
   "proxy.node.config.reconfigure_time",
   "proxy.node.config.restart_required.cop",
   "proxy.node.config.restart_required.manager",
   "proxy.node.config.restart_required.proxy",
   "proxy.node.current_server_connections",
-  "proxy.node.hostdb.hit_ratio",
   "proxy.node.proxy_running",
   "proxy.node.restarts.manager.start_time",
   "proxy.node.restarts.proxy.cache_ready_time",
diff --git a/proxy/config/metrics.config.default b/proxy/config/metrics.config.default
index 5e80cb4..a6a4761 100644
--- a/proxy/config/metrics.config.default
+++ b/proxy/config/metrics.config.default
@@ -14,10 +14,6 @@
 --
 -- HTTP Cache.
 --
-float 'proxy.node.hostdb.hit_ratio' [[
-  return proxy.process.hostdb.total_hits / proxy.process.hostdb.total_lookups
-]]
-
 counter 'proxy.node.http.user_agent_total_request_bytes' [[
   return proxy.process.http.user_agent_request_document_total_size +
     proxy.process.http.user_agent_request_header_total_size
@@ -52,11 +48,6 @@ counter 'proxy.node.origin_server_total_bytes' [[
     proxy.node.http.parent_proxy_total_response_bytes
 ]]
 
-float 'proxy.node.bandwidth_hit_ratio' [[
-  return (proxy.node.user_agent_total_bytes - proxy.node.origin_server_total_bytes)
-      / proxy.node.user_agent_total_bytes
-]]
-
 counter 'proxy.node.cache_total_hits' [[
   return proxy.process.http.cache_hit_fresh +
     proxy.process.http.cache_hit_revalidated +
@@ -77,24 +68,6 @@ counter 'proxy.node.cache_total_misses' [[
     proxy.process.http.cache_read_error
 ]]
 
-float 'proxy.node.cache_hit_ratio' [[
-  return
-    proxy.node.cache_total_hits   /
-    (
-      proxy.node.cache_total_hits   +
-      proxy.node.cache_total_misses
-    )
-]]
-
-float 'proxy.node.cache_hit_mem_ratio' [[
-  return
-    proxy.node.cache_total_hits_mem   /
-    (
-    proxy.node.cache_total_hits   +
-    proxy.node.cache_total_misses
-    )
-]]
-
 integer 'proxy.node.current_server_connections' [[
   return
     proxy.process.http.current_server_connections +

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.