Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
63158211
Commit
63158211
authored
Apr 22, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #6633 support float engine status values
parent
876a1ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
scripts/tokustat.py
scripts/tokustat.py
+18
-7
No files found.
scripts/tokustat.py
View file @
63158211
#!/usr/bin/env python
#!/usr/bin/env python
import
sys
import
time
...
...
@@ -12,23 +12,34 @@ def usage():
print
"[--sleeptime=SLEEPTIME] (default: 10 seconds)"
return
1
def
convert
(
v
):
if
type
(
v
)
==
type
(
'str'
):
try
:
v
=
int
(
v
)
except
:
v
=
float
(
v
)
return
v
def
printit
(
stats
,
rs
,
sleeptime
):
# print rs
for
t
in
rs
:
l
=
len
(
t
)
# grab the last 2 fields in t
k
=
t
[
l
-
2
]
v
=
t
[
l
-
1
]
# print k, v
# print k, v # debug
# try to convert v
try
:
v
=
convert
(
v
)
except
:
pass
if
stats
.
has_key
(
k
):
oldv
=
stats
[
k
]
if
v
!=
oldv
:
print
k
,
"|"
,
oldv
,
"|"
,
v
,
try
:
vi
=
int
(
v
)
oldvi
=
int
(
oldv
)
d
=
vi
-
oldvi
if
d
<=
0
or
d
<
sleeptime
:
raise
"invalid"
d
=
v
-
oldv
if
d
==
0
:
d
=
float
(
v
-
oldv
)
print
"|"
,
d
,
"|"
,
d
/
sleeptime
except
:
print
...
...
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