Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for oceanbase tpch #670

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/mysql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<mysql_ssl_cert>client-cert.pem</mysql_ssl_cert>
<mysql_ssl_key>client-key.pem</mysql_ssl_key>
<mysql_ssl_cipher>server</mysql_ssl_cipher>
<mysql_oceanbase_port>2881</mysql_oceanbase_port>
</connection>
<tpcc>
<schema>
Expand Down Expand Up @@ -46,10 +47,13 @@
<schema>
<mysql_scale_fact>1</mysql_scale_fact>
<mysql_tpch_user>root</mysql_tpch_user>
<mysql_ob_tenant_name>tpch</mysql_ob_tenant_name>
<mysql_tpch_pass>mysql</mysql_tpch_pass>
<mysql_tpch_dbase>tpch</mysql_tpch_dbase>
<mysql_num_tpch_threads>1</mysql_num_tpch_threads>
<mysql_tpch_storage_engine>innodb</mysql_tpch_storage_engine>
<mysql_tpch_obcompat>false</mysql_tpch_obcompat>
<mysql_ob_partition_num>1</mysql_ob_partition_num>
<mysql_tpch_storage_engine>innodb</mysql_tpch_storage_engine>
</schema>
<driver>
<mysql_total_querysets>1</mysql_total_querysets>
Expand Down
16 changes: 16 additions & 0 deletions scripts/tcl/oceanbase/tproch/ob_tproch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export TMP=`pwd`/TMP
mkdir -p $TMP

echo "BUILD HAMMERDB SCHEMA"
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
./hammerdbcli auto ./scripts/tcl/oceanbase/tproch/ob_tproch_buildschema.tcl
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
echo "RUN HAMMERDB TEST"
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
./hammerdbcli auto ./scripts/tcl/oceanbase/tproch/ob_tproch_run.tcl
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
echo "DROP HAMMERDB SCHEMA"
./hammerdbcli auto ./scripts/tcl/oceanbase/tproch/ob_tproch_deleteschema.tcl
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
echo "HAMMERDB RESULT"
./hammerdbcli auto ./scripts/tcl/oceanbase/tproch/ob_tproch_result.tcl
22 changes: 22 additions & 0 deletions scripts/tcl/oceanbase/tproch/ob_tproch_buildschema.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/tclsh

puts "SETTING CONFIGURATION"
dbset db mysql
dbset bm TPC-H

diset connection mysql_host 127.0.0.1
diset connection mysql_port 2881
diset connection mysql_socket /tmp/mysql.sock

diset tpch mysql_scale_fact 1
diset tpch mysql_num_tpch_threads [ numberOfCPUs ]
diset tpch mysql_tpch_user root
diset tpch mysql_tpch_pass 123
diset tpch mysql_tpch_dbase tpch
diset tpch mysql_tpch_obcompat true
diset tpch ob_partition_num 1
diset tpch ob_tenant_name hmdb
diset tpch mysql_tpch_storage_engine innodb
puts "SCHEMA BUILD STARTED"
buildschema
puts "SCHEMA BUILD COMPLETED"
19 changes: 19 additions & 0 deletions scripts/tcl/oceanbase/tproch/ob_tproch_deleteschema.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/tclsh

puts "SETTING CONFIGURATION"
dbset db mysql
dbset bm TPC-H

diset connection mysql_host 127.0.0.1
diset connection mysql_port 2881
diset connection mysql_socket /tmp/mysql.sock

diset tpch mysql_tpch_user root
diset tpch mysql_tpch_pass 123
diset tpch mysql_tpch_dbase tpch
diset tpch mysql_tpch_obcompat true
diset tpch ob_partition_num 1
diset ob_tenant_name hmdb
puts " DROP SCHEMA STARTED"
deleteschema
puts "DROP SCHEMA COMPLETED"
3 changes: 3 additions & 0 deletions scripts/tcl/oceanbase/tproch/ob_tproch_result.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set tmpdir $::env(TMP)
set ::outputfile $tmpdir/mysql_tproch
source ./scripts/tcl/generic/generic_tproch_result.tcl
30 changes: 30 additions & 0 deletions scripts/tcl/oceanbase/tproch/ob_tproch_run.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/tclsh

set tmpdir $::env(TMP)
puts "SETTING CONFIGURATION"
dbset db mysql
dbset bm TPC-H

diset mysql_host 127.0.0.1
diset connection mysql_port 2881
diset connection mysql_socket /tmp/mysql.sock

diset tpch mysql_scale_fact 1
diset tpch mysql_tpch_user root
diset tpch mysql_tpch_pass 123
diset tpch mysql_tpch_dbase tpch
diset tpch mysql_tpch_obcompat true
diset tpch ob_partition_num 1
diset tpch ob_tenant_name hmdb
diset tpch mysql_tpch_storage_engine innodb

loadscript
puts "TEST STARTED"
vuset vu 1
vucreate
set jobid [ vurun ]
vudestroy
puts "TEST COMPLETE"
set of [ open $tmpdir/mysql_tproch w ]
puts $of $jobid
close $of
Loading