Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christopher Ferreira
erods-bench
Commits
2dba57a0
Commit
2dba57a0
authored
Jun 26, 2017
by
aumgn
Browse files
[schedstats] Fix schedstatparser
parent
5419e478
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/schedstat/schedstatparser.py
View file @
2dba57a0
import
re
import
sys
SCHEDSTAT_VERSION
=
15
version_re
=
re
.
compile
(
'^version ([0-9]+)$'
)
...
...
@@ -14,14 +15,14 @@ def check_version(match):
empty_re
=
re
.
compile
(
'^\s*$'
)
class
Cpu
:
RE
=
re
.
compile
(
'^cpu([0-9]+) ([0-9 ]+)$'
)
RE
=
re
.
compile
(
'^cpu([0-9]+) ([
\-
0-9 ]+)$'
)
def
__init__
(
self
,
match
):
self
.
index
=
int
(
match
.
group
(
1
))
self
.
stats
=
[
int
(
stat
)
for
stat
in
match
.
group
(
2
).
split
(
" "
)
]
self
.
domains
=
{}
class
Domain
:
RE
=
re
.
compile
(
'^domain([0-9]+) ([0-9a-f,]+) ([0-9 ]+)$'
)
RE
=
re
.
compile
(
'^domain([0-9]+) ([
\-
0-9a-f,]+) ([
\-
0-9 ]+)$'
)
def
__init__
(
self
,
match
):
self
.
index
=
int
(
match
.
group
(
1
))
self
.
cpusmask
=
[
int
(
part
,
16
)
for
part
in
match
.
group
(
2
).
split
(
","
)
]
...
...
Write
Preview
Supports
Markdown
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