tools/scyllatop: some sensible default metrics
Previosly if the user did not specify any metrics, scyllatop use whatever it could find. Now we have some preset defaults which are probably more interesting. Signed-off-by: Yoav Kleinberger <yoav@scylladb.com> Message-Id: <1458658804-377-1-git-send-email-yoav@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
5019b709ba
commit
97bb7a35d9
14
tools/scyllatop/defaults.py
Normal file
14
tools/scyllatop/defaults.py
Normal file
@@ -0,0 +1,14 @@
|
||||
DEFAULT_METRIC_PATTERNS = [
|
||||
'*cache*',
|
||||
'*disk*',
|
||||
'*transport*',
|
||||
'*netlink*',
|
||||
'*network*',
|
||||
'*storage_proxy*',
|
||||
'*la*',
|
||||
'*reactor*',
|
||||
'*idle*',
|
||||
'*interface*',
|
||||
'*memory*',
|
||||
'*cpu*',
|
||||
]
|
||||
@@ -2,6 +2,7 @@ import logging
|
||||
import fnmatch
|
||||
import time
|
||||
import metric
|
||||
import defaults
|
||||
|
||||
|
||||
class LiveData(object):
|
||||
@@ -25,9 +26,8 @@ class LiveData(object):
|
||||
def _initializeMetrics(self, metricPatterns):
|
||||
if len(metricPatterns) > 0:
|
||||
self._setupUserSpecifiedMetrics(metricPatterns)
|
||||
return
|
||||
|
||||
self._measurements = metric.Metric.discover(self._collectd)
|
||||
else:
|
||||
self._setupUserSpecifiedMetrics(defaults.DEFAULT_METRIC_PATTERNS)
|
||||
|
||||
def _setupUserSpecifiedMetrics(self, metricPatterns):
|
||||
availableSymbols = [m.symbol for m in metric.Metric.discover(self._collectd)]
|
||||
|
||||
Reference in New Issue
Block a user