Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uahil
CPUnetPLOT
Commits
e89e787e
Commit
e89e787e
authored
Aug 11, 2014
by
Mario Hock
Browse files
A new "simple_plotter.py" file.
So far, just the demo code from the cnl_library is copied..
parent
e7d4dd47
Changes
1
Hide whitespace changes
Inline
Side-by-side
simple_plotter.py
0 → 100755
View file @
e89e787e
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import
sys
import
matplotlib
from
cnl_library
import
CNLParser
## MAIN ##
if
__name__
==
"__main__"
:
### DEMO:
filename
=
sys
.
argv
[
1
]
print
(
filename
)
## * Parse input file. *
cnl_file
=
CNLParser
(
filename
)
## Display header informations.
print
(
cnl_file
.
get_type
()
)
print
(
"CPUs: "
+
str
(
cnl_file
.
get_cpus
())
)
print
(
"NICs: "
+
str
(
cnl_file
.
get_nics
())
)
## Display some csv/data fields.
names
=
None
names
=
[
"eth0.send"
,
"eth0.receive"
]
print
(
names
)
for
x
in
cnl_file
.
get_csv_iterator
(
names
):
print
(
", "
.
join
(
x
)
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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