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
e19e69fb
Commit
e19e69fb
authored
Apr 09, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added gprof options
added a benchmark test for count(distinct) mysql-test/mysql-test-run.sh: u
parent
5102766f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+27
-1
mysql-test/r/bench_count_distinct.result
mysql-test/r/bench_count_distinct.result
+2
-0
mysql-test/t/bench_count_distinct.test
mysql-test/t/bench_count_distinct.test
+12
-0
No files found.
mysql-test/mysql-test-run.sh
View file @
e19e69fb
...
...
@@ -127,6 +127,9 @@ while test $# -gt 0; do
fi
DO_GCOV
=
1
;;
--gprof
)
DO_GPROF
=
1
;;
--gdb
)
if
[
x
$BINARY_DIST
=
x1
]
;
then
$ECHO
"Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with -gdb option"
...
...
@@ -238,7 +241,10 @@ MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --u
GDB_MASTER_INIT
=
$MYSQL_TMP_DIR
/gdbinit.master
GDB_SLAVE_INIT
=
$MYSQL_TMP_DIR
/gdbinit.slave
GCOV_MSG
=
$MYSQL_TMP_DIR
/mysqld-gcov.out
GCOV_ERR
=
$MYSQL_TMP_DIR
/mysqld-gcov.err
GCOV_ERR
=
$MYSQL_TMP_DIR
/mysqld-gcov.err
GPROF_DIR
=
$MYSQL_TMP_DIR
/gprof
GPROF_MASTER
=
$GPROF_DIR
/master.gprof
GPROF_SLAVE
=
$GPROF_DIR
/slave.gprof
TIMEFILE
=
"
$MYSQL_TMP_DIR
/mysqltest-time"
SLAVE_MYSQLD
=
$MYSQLD
#this can be changed later if we are doing gcov
...
...
@@ -324,6 +330,24 @@ mysql_install_db () {
return
0
}
gprof_prepare
()
{
rm
-rf
$GPROF_DIR
mkdir
-p
$GPROF_DIR
}
gprof_collect
()
{
if
[
-f
$MASTER_MYDDIR
/gmon.out
]
;
then
gprof
$MYSQLD
$MASTER_MYDDIR
/gmon.out
>
$GPROF_MASTER
echo
"Master execution profile has been saved in
$GPROF_MASTER
"
fi
if
[
-f
$SLAVE_MYDDIR
/gmon.out
]
;
then
gprof
$MYSQLD
$SLAVE_MYDDIR
/gmon.out
>
$GPROF_SLAVE
echo
"Slave execution profile has been saved in
$GPROF_SLAVE
"
fi
}
gcov_prepare
()
{
$FIND
$BASEDIR
-name
\*
.gcov
\
-or
-name
\*
.da |
$XARGS
$RM
...
...
@@ -663,6 +687,7 @@ run_testcase ()
[
"
$DO_GCOV
"
-a
!
-x
"
$GCOV
"
]
&&
error
"No gcov found"
[
"
$DO_GCOV
"
]
&&
gcov_prepare
[
"
$DO_GPROF
"
]
&&
gprof_prepare
# Ensure that no old mysqld test servers are running
if
[
-z
"
$USE_RUNNING_SERVER
"
]
...
...
@@ -722,5 +747,6 @@ report_stats
$ECHO
[
"
$DO_GCOV
"
]
&&
gcov_collect
# collect coverage information
[
"
$DO_GPROF
"
]
&&
gprof_collect
# collect coverage information
exit
0
mysql-test/r/bench_count_distinct.result
0 → 100644
View file @
e19e69fb
count(distinct n)
10000
mysql-test/t/bench_count_distinct.test
0 → 100644
View file @
e19e69fb
drop
table
if
exists
t1
;
create
table
t1
(
n
int
not
null
,
key
(
n
));
let
$
1
=
10000
;
while
(
$
1
)
{
eval
insert
into
t1
values
(
$
1
);
eval
insert
into
t1
values
(
$
1
);
dec
$
1
;
}
select
count
(
distinct
n
)
from
t1
;
drop
table
t1
;
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