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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b7feee73
Commit
b7feee73
authored
Sep 03, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Tokutek/tokudb-engine
parents
f7c43e4b
ddc9e748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
scripts/make.mysql.bash
scripts/make.mysql.bash
+1
-1
scripts/tokustat.py
scripts/tokustat.py
+18
-14
No files found.
scripts/make.mysql.bash
View file @
b7feee73
...
@@ -52,7 +52,7 @@ cmake_build_type=RelWithDebInfo
...
@@ -52,7 +52,7 @@ cmake_build_type=RelWithDebInfo
mysql_tree
=
mysql_tree
=
tokudbengine_tree
=
tokudbengine_tree
=
ftindex_tree
=
ftindex_tree
=
jemalloc_version
=
3.
3
.0
jemalloc_version
=
3.
6
.0
jemalloc_tree
=
jemalloc_tree
=
backup_tree
=
backup_tree
=
...
...
scripts/tokustat.py
View file @
b7feee73
...
@@ -9,10 +9,10 @@ def usage():
...
@@ -9,10 +9,10 @@ def usage():
print
"diff the tokudb engine status"
print
"diff the tokudb engine status"
print
"--host=HOSTNAME (default: localhost)"
print
"--host=HOSTNAME (default: localhost)"
print
"--port=PORT"
print
"--port=PORT"
print
"--sleeptime=SLEEPTIME (default: 10 seconds)"
print
"--iterations=MAX_ITERATIONS (default: forever)"
print
"--interval=TIME_BETWEEN_SAMPLES (default: 10 seconds)"
print
"--q='show engine tokudb status'"
print
"--q='show engine tokudb status'"
print
"--q='select * from information_schema.global_status'"
print
"--q='select * from information_schema.global_status'"
return
1
return
1
def
convert
(
v
):
def
convert
(
v
):
...
@@ -23,14 +23,11 @@ def convert(v):
...
@@ -23,14 +23,11 @@ def convert(v):
v
=
float
(
v
)
v
=
float
(
v
)
return
v
return
v
def
printit
(
stats
,
rs
,
sleeptime
):
def
printit
(
stats
,
rs
,
interval
):
# print rs
for
t
in
rs
:
for
t
in
rs
:
l
=
len
(
t
)
# grab the last 2 fields in t
l
=
len
(
t
)
# grab the last 2 fields in t
k
=
t
[
l
-
2
]
k
=
t
[
l
-
2
]
v
=
t
[
l
-
1
]
v
=
t
[
l
-
1
]
# print k, v # debug
# try to convert v
try
:
try
:
v
=
convert
(
v
)
v
=
convert
(
v
)
except
:
except
:
...
@@ -41,11 +38,11 @@ def printit(stats, rs, sleeptime):
...
@@ -41,11 +38,11 @@ def printit(stats, rs, sleeptime):
print
k
,
"|"
,
oldv
,
"|"
,
v
,
print
k
,
"|"
,
oldv
,
"|"
,
v
,
try
:
try
:
d
=
v
-
oldv
d
=
v
-
oldv
if
sleeptime
!=
1
:
if
interval
!=
1
:
if
d
>=
sleeptime
:
if
d
>=
interval
:
e
=
d
/
sleeptime
e
=
d
/
interval
else
:
else
:
e
=
float
(
d
)
/
sleeptime
e
=
float
(
d
)
/
interval
print
"|"
,
d
,
"|"
,
e
print
"|"
,
d
,
"|"
,
e
else
:
else
:
print
"|"
,
d
print
"|"
,
d
...
@@ -59,7 +56,9 @@ def main():
...
@@ -59,7 +56,9 @@ def main():
port
=
None
port
=
None
user
=
None
user
=
None
passwd
=
None
passwd
=
None
sleeptime
=
10
interval
=
10
iterations
=
0
q
=
'show engine tokudb status'
q
=
'show engine tokudb status'
for
a
in
sys
.
argv
[
1
:]:
for
a
in
sys
.
argv
[
1
:]:
...
@@ -71,6 +70,9 @@ def main():
...
@@ -71,6 +70,9 @@ def main():
continue
continue
return
usage
()
return
usage
()
iterations
=
int
(
iterations
)
interval
=
int
(
interval
)
connect_parameters
=
{}
connect_parameters
=
{}
if
host
is
not
None
:
if
host
is
not
None
:
if
host
[
0
]
==
'/'
:
if
host
[
0
]
==
'/'
:
...
@@ -93,7 +95,9 @@ def main():
...
@@ -93,7 +95,9 @@ def main():
print
"connected"
print
"connected"
stats
=
{}
stats
=
{}
while
1
:
i
=
0
while
iterations
==
0
or
i
<=
iterations
:
i
+=
1
try
:
try
:
c
=
db
.
cursor
()
c
=
db
.
cursor
()
n
=
c
.
execute
(
q
)
n
=
c
.
execute
(
q
)
...
@@ -105,8 +109,8 @@ def main():
...
@@ -105,8 +109,8 @@ def main():
return
2
return
2
try
:
try
:
printit
(
stats
,
rs
,
int
(
sleeptime
)
)
printit
(
stats
,
rs
,
int
erval
)
time
.
sleep
(
int
(
sleeptime
)
)
time
.
sleep
(
int
erval
)
except
:
except
:
print
"printit"
,
sys
.
exc_info
()
print
"printit"
,
sys
.
exc_info
()
return
3
return
3
...
...
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