-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_ora_bench.bat
189 lines (158 loc) · 7.22 KB
/
run_ora_bench.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@echo off
set ORA_BENCH_PROPERTIES=variations
set ORA_BENCH_PROPERTIES=standard
rem --------------------------------------------------------------------------------
rem
rem run_ora_bench.bat: Oracle Benchmark for all database versions
rem with ORA_BENCH_PROPERTIES properties.
rem
rem --------------------------------------------------------------------------------
setlocal EnableDelayedExpansion
set ORA_BENCH_BENCHMARK_COMMENT="Standard tests (locally)"
set ORA_BENCH_BENCHMARK_DATABASE_DEFAULT=21
set ORA_BENCH_CHOICE_DRIVER_DEFAULT=none
set ORA_BENCH_CONNECTION_HOST_DEFAULT=localhost
set ORA_BENCH_CONNECTION_PORT_DEFAULT=1521
set "ORA_BENCH_BENCHMARK_VCVARSALL=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
if exist ora_bench.log del /f /q ora_bench.log
if exist priv\ora_bench_result.csv del /f /q priv\ora_bench_result.csv
if exist priv\ora_bench_result.tsv del /f /q priv\ora_bench_result.tsv
if ["%ORA_BENCH_CONNECTION_HOST%"] EQU [""] (
set ORA_BENCH_CONNECTION_HOST=%ORA_BENCH_CONNECTION_HOST_DEFAULT%
)
if ["%ORA_BENCH_CONNECTION_PORT%"] EQU [""] (
set ORA_BENCH_CONNECTION_PORT=%ORA_BENCH_CONNECTION_PORT_DEFAULT%
)
if ["%1"] EQU [""] (
echo ===============================================================================
echo complete - All implemented variations
echo none - Without specific driver run
echo -------------------------------------------------------------------------------
echo c - C++ [gcc] and Oracle ODPI-C
echo elixir - Elixir and oranif
echo erlang - Erlang and oranif
echo go - Go and godror
echo java - Java and Oracle JDBC
echo julia_jdbc - Julia and JDBC.jl
echo julia_oracle - Julia and Oracle.jl
echo kotlin - Kotlin and Oracle JDBC
echo nim - Nim and nimodpi
echo python - Python 3 and cx_Oracle
echo rust - Rust and Rust-oracle
echo -------------------------------------------------------------------------------
set /P ORA_BENCH_CHOICE_DRIVER="Enter the desired programming language (and database driver) [default: %ORA_BENCH_CHOICE_DRIVER_DEFAULT%] "
if ["!ORA_BENCH_CHOICE_DRIVER!"] EQU [""] (
set ORA_BENCH_CHOICE_DRIVER=%ORA_BENCH_CHOICE_DRIVER_DEFAULT%
)
) else (
set ORA_BENCH_CHOICE_DRIVER=%1
)
if ["%2"] EQU [""] (
echo ===============================================================================
echo complete - All implemented variations
echo -------------------------------------------------------------------------------
echo 18xe - Oracle Database 18c Express Edition
echo 19 - Oracle Database 19c
echo 21 - Oracle Database 21c
echo 21xe - Oracle Database 21c Express Edition
echo -------------------------------------------------------------------------------
set /P ORA_BENCH_CHOICE_DB="Enter the desired database version [default: %ORA_BENCH_BENCHMARK_DATABASE_DEFAULT%] "
if ["!ORA_BENCH_CHOICE_DB!"] EQU [""] (
set ORA_BENCH_CHOICE_DB=%ORA_BENCH_BENCHMARK_DATABASE_DEFAULT%
)
) else (
set ORA_BENCH_CHOICE_DB=%2
)
set ERRORLEVEL=0
set ORA_BENCH_RUN_DB_18_4_XE=false
set ORA_BENCH_RUN_DB_19_3_EE=false
set ORA_BENCH_RUN_DB_21_3_EE=false
set ORA_BENCH_RUN_DB_21_3_XE=false
if ["%ORA_BENCH_CHOICE_DB%"] EQU ["complete"] (
set ORA_BENCH_RUN_DB_18_4_XE=true
set ORA_BENCH_RUN_DB_19_3_EE=true
set ORA_BENCH_RUN_DB_21_3_EE=true
set ORA_BENCH_RUN_DB_21_3_XE=true
)
if ["%ORA_BENCH_CHOICE_DB%"] EQU ["18xe"] (
set ORA_BENCH_RUN_DB_18_4_XE=true
)
if ["%ORA_BENCH_CHOICE_DB%"] EQU ["19"] (
set ORA_BENCH_RUN_DB_19_3_EE=true
)
if ["%ORA_BENCH_CHOICE_DB%"] EQU ["21"] (
set ORA_BENCH_RUN_DB_21_3_EE=true
)
if ["%ORA_BENCH_CHOICE_DB%"] EQU ["21xe"] (
set ORA_BENCH_RUN_DB_21_3_XE=true
)
set ORA_BENCH_PASSWORD_SYS=oracle
if ["%ORA_BENCH_FILE_CONFIGURATION_NAME%"] EQU [""] (
set ORA_BENCH_FILE_CONFIGURATION_NAME=priv\properties\ora_bench.properties
)
echo.
echo Script %0 is now running
echo.
echo You can find the run log in the file run_ora_bench.log
echo.
echo Please wait ...
echo.
> run_ora_bench.log 2>&1 (
echo ===============================================================================
echo Start %0
echo -------------------------------------------------------------------------------
echo ora_bench - Oracle benchmark - all databases.
echo -------------------------------------------------------------------------------
echo CHOICE_DRIVER : %ORA_BENCH_CHOICE_DRIVER%
echo CHOICE_DB : %ORA_BENCH_CHOICE_DB%
echo -------------------------------------------------------------------------------
echo:| TIME
echo ===============================================================================
call scripts\run_create_bulk_file.bat
if %ERRORLEVEL% neq 0 (
echo Processing of the script: %0 - step: 'call scripts\run_create_bulk_file.bat' was aborted, error code=%ERRORLEVEL%
exit -1073741510
)
set ORA_BENCH_BULKFILE_EXISTING=true
if ["%ORA_BENCH_RUN_DB_18_4_XE%"] EQU ["true"] (
set ORA_BENCH_BENCHMARK_DATABASE=db_18_4_xe
set ORA_BENCH_CONNECTION_SERVICE=xe
call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat
if %ERRORLEVEL% neq 0 (
echo Processing of the script: %0 - step: 'call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat' was aborted, error code=%ERRORLEVEL%
exit -1073741510
)
)
if ["%ORA_BENCH_RUN_DB_19_3_EE%"] EQU ["true"] (
set ORA_BENCH_BENCHMARK_DATABASE=db_19_3_ee
set ORA_BENCH_CONNECTION_SERVICE=orclpdb1
call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat
if %ERRORLEVEL% neq 0 (
echo Processing of the script: %0 - step: 'call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat' was aborted, error code=%ERRORLEVEL%
exit -1073741510
)
)
if ["%ORA_BENCH_RUN_DB_21_3_EE%"] EQU ["true"] (
set ORA_BENCH_BENCHMARK_DATABASE=db_21_3_ee
set ORA_BENCH_CONNECTION_SERVICE=orclpdb1
call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat
if %ERRORLEVEL% neq 0 (
echo Processing of the script: %0 - step: 'call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat' was aborted, error code=%ERRORLEVEL%
exit -1073741510
)
)
if ["%ORA_BENCH_RUN_DB_21_3_XE%"] EQU ["true"] (
set ORA_BENCH_BENCHMARK_DATABASE=db_21_3_xe
set ORA_BENCH_CONNECTION_SERVICE=xe
call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat
if %ERRORLEVEL% neq 0 (
echo Processing of the script: %0 - step: 'call scripts\run_properties_%ORA_BENCH_PROPERTIES%.bat' was aborted, error code=%ERRORLEVEL%
exit -1073741510
)
)
echo -------------------------------------------------------------------------------
echo:| TIME
echo -------------------------------------------------------------------------------
echo End %0
echo ===============================================================================
)