Adding all memcached stats that return a single value

as described at
https://docs.oracle.com/cd/E17952_01/refman-5.0-en/ha-memcached-stats-general.html

closes #412
This commit is contained in:
Mischa Gresser 2015-12-02 13:20:31 -05:00 committed by Cameron Sparr
parent 4b3b41fea5
commit 3509713a23
2 changed files with 27 additions and 1 deletions

View File

@ -33,6 +33,27 @@ var sendAsIs = []string{
"evictions",
"limit_maxbytes",
"bytes",
"uptime",
"curr_items",
"total_items",
"curr_connections",
"total_connections",
"connection_structures",
"cmd_get",
"cmd_set",
"delete_hits",
"delete_misses",
"incr_hits",
"incr_misses",
"decr_hits",
"decr_misses",
"cas_hits",
"cas_misses",
"evictions",
"bytes_read",
"bytes_written",
"threads",
"conn_yields",
}
// SampleConfig returns sample configuration message

View File

@ -22,7 +22,12 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
err := m.Gather(&acc)
require.NoError(t, err)
intMetrics := []string{"get_hits", "get_misses", "evictions", "limit_maxbytes", "bytes"}
intMetrics := []string{"get_hits", "get_misses", "evictions",
"limit_maxbytes", "bytes", "uptime", "curr_items", "total_items",
"curr_connections", "total_connections", "connection_structures", "cmd_get",
"cmd_set", "delete_hits", "delete_misses", "incr_hits", "incr_misses",
"decr_hits", "decr_misses", "cas_hits", "cas_misses", "evictions",
"bytes_read", "bytes_written", "threads", "conn_yields"}
for _, metric := range intMetrics {
assert.True(t, acc.HasIntValue(metric), metric)