Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
e3680a92
Commit
e3680a92
authored
May 21, 2017
by
casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bench
parent
e659a998
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
bench.sh
packages/tls/bench.sh
+53
-0
No files found.
packages/tls/bench.sh
0 → 100755
View file @
e3680a92
if
[
$#
=
0
]
;
then
echo
"arg1: len of field, arg2 num in pipe, arg3 num of pipe"
exit
fi
function
inittable
{
mysql
-uroot
-pletmein
-h127
.0.0.1
-P3399
-e
"drop database if exists tpcc1000"
mysql
-uroot
-pletmein
-h127
.0.0.1
-P3399
-e
"create database tpcc1000"
mysql
-uroot
-pletmein
-h127
.0.0.1
-P3399
-e
"use tpcc1000; drop table if exists student"
len
=
$[$1
+16]
#not supported
#mysql -uroot -pletmein -h127.0.0.1 -P3399 -e "create table if not exists tpcc1000.student(name varchar(${len}))"
mysql
-uroot
-pletmein
-h127
.0.0.1
-P3399
-e
"use tpcc1000; create table if not exists student(name varchar(
${
len
}
))"
echo
"create table if not exists tpcc1000.student(name varchar(
${
len
}
))"
}
#generate load.sql
head
=
'INSERT INTO student VALUES '
cur
=
""
function
getField
{
num
=
$1
for
((
i
=
0
;
i<
$num
;
i++
))
do
cur
=
${
cur
}
a
done
cur
=
\'
$cur
\'
}
getField
$1
multi
=
""
function
getMultipleFields
{
num
=
$1
multi
=
\(
$cur
\)
for
((
i
=
1
;
i<
$num
;
i++
))
do
multi
=
${
multi
}
\,\(
$cur
\)
done
}
getMultipleFields
$2
rm
-rf
load.sql
for
((
i
=
0
;
i<
$3
;
i++
))
do
echo
$head$multi
\;
>>
load.sql
done
inittable
$1
mysql
-uroot
-pletmein
-h127
.0.0.1
-P3399
tpcc1000 < load.sql
mysqldump
--skip-extended-insert
-uroot
-pletmein
-h127
.0.0.1
--hex-blob
--compact
tpcc1000
>
back.sql
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