Commit c90bae3d by Bach Dániel

fix flake8 errors

parent dd5f6fc0
......@@ -12,8 +12,8 @@ def main():
configuration, metrics = cnfparse.importConf("config/client.conf")
cli = client.Client(configuration)
cli.startReporting(metricCollectors=
collectables.collectables.provide(metrics))
cli.startReporting(
metricCollectors=collectables.collectables.provide(metrics))
if __name__ == "__main__":
......
from metrics import *
from metrics import std
class collectables:
......
......@@ -26,8 +26,7 @@ class Collection(object):
return Metrics(cls.name,
query[cls.collector_function_result_attr])
elif (isinstance(query, tuple)):
return Metrics(cls.name,
query.__getattribute__(
return Metrics(cls.name, query.__getattribute__(
cls.collector_function_result_attr))
else:
return Metrics(cls.name, query)
......@@ -42,12 +41,9 @@ class std(Collection):
class usage(Collection.Group.Metric):
name = "cpu.usage"
collector_function = ps.cpu_percent
collector_function_arguments = {
'interval': 0.0,
}
collector_function_arguments = {'interval': 0.0}
class memory(Collection.Group):
class usage(Collection.Group.Metric):
name = "memory.usage"
collector_function = ps.virtual_memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment