Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
monitor-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
7b410839
authored
Oct 10, 2013
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Voila
parent
c9e70b85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/metrics.py
+4
-5
src/metrics.pyc
+0
-0
No files found.
src/metrics.py
View file @
7b410839
...
...
@@ -16,13 +16,12 @@ class Collection (object):
@classmethod
def
harvest
(
cls
):
print
(
cls
.
collector_function_arguments
)
query
=
cls
.
collector_function
(
**
cls
.
collector_function_arguments
)
query
=
cls
.
collector_function
.
im_func
(
**
cls
.
collector_function_arguments
)
if
((
isinstance
(
query
,
list
))
or
(
isinstance
(
query
,
dict
))):
return
Metrics
(
name
,
return
Metrics
(
cls
.
name
,
query
[
cls
.
collector_function_result_attr
])
elif
(
isinstance
(
query
,
tuple
)):
return
Metrics
(
name
,
return
Metrics
(
cls
.
name
,
query
.
__getattribute__
(
cls
.
collector_function_result_attr
))
else
:
return
Metrics
(
cls
.
name
,
...
...
@@ -35,11 +34,11 @@ class std (Collection):
class
cpu
(
Collection
.
Group
):
class
usage
(
Collection
.
Group
.
Metric
):
name
=
"cpu.usage"
collector_function
=
ps
.
cpu_percent
collector_function_arguments
=
{
'interval'
:
0.0
,
}
name
=
"cpu.usage"
class
memory
(
Collection
.
Group
):
...
...
src/metrics.pyc
View file @
7b410839
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment