Skip to content

Commit

Permalink
Merge pull request #11 from oracle/dev310
Browse files Browse the repository at this point in the history
Dev310
  • Loading branch information
bengsig authored Oct 3, 2023
2 parents 95fa636 + 59c3ebd commit 69a870c
Show file tree
Hide file tree
Showing 284 changed files with 18,649 additions and 2,043 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# RWP\*Load Simulator Release Notes

## 3.1.0

* Bug fixes
* $pre31fileassign:off is now default
* Ociping enhanced to create graphs of many executions
* floor, ceil, trunc functions
* % works on double arguments
* sessionpool wait timeout actions
* option/directive to log all sql
* debug options are named in -D and directives
* directly embedded sql can be dynamic using &variable.
* for loops can be over a list of expressions
* parse error location shown at all potential places

## 3.0.6

* Bug fixes
Expand Down
4 changes: 4 additions & 0 deletions GENERATED.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* of the directories in PATH. An appropriate Oracle
* client environment with properly set LD_LIBRARY_PATH
* is needed.
*
* To get help for either exeuctable, execute it with a
* -h option. To show the rwl source, exeucte with a
* --list-generated option.
*
* The full source code is available from
* https://opensource.oracle.com/
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ installation using rwlman and from

## News

Release 3.0 includes these major new features:
Release 3.1 includes several new features with primary focus on using rwloadsim
as a scripting tool.
For details, see [CHANGELOG.md](CHANGELOG.md).

Release 3.0 included these major new features:

* SQL declaration no longer needs explicit bind and/or define, as bind variables and select list elements can be implicitly matched to declared variables.
* The separate declaration and subsequent execution of SQL is no longer needed.
Expand All @@ -19,28 +23,26 @@ Release 3.0 includes these major new features:
* New syntax for file open for read, append or pipe (added in 3.0.3)
* Release 3.0.6 will be the last 3.0 release, in 3.1 the new file open syntax will be enforced

In addition, there are several minor update,
In addition, there are several minor updates,
a number of bug fixes and updates to the standard oltp workload
as shown in [CHANGELOG.md](CHANGELOG.md).

Note that there was an update to the repository in 3.0.4 and that you _must_ apply
the rwl304.sql script if you are upgrading from version 3.0.3 or earlier.
There is also a repository upgrade in 3.0.6 and you _must_ apply the rwl306.sql script
before using release 3.0.6.
before using release 3.0.6 or newer.
See [docs/INSTALL.md](docs/INSTALL.md) for details.

## Branches

The branches that should be used by ordinary users are named after the release, e.g. 3.0.6.
The branch named "development" is getting frequent commits
and may as such contain intermediate code.
The master branch receives occasional pull request from the development branch.
You should normally _not_ clone or checkout the development or master branch
The branches that should be used by ordinary users are named after the release, e.g. 3.1.0.
The master branch receives occasional pull request from the various development branches.
You should normally _not_ clone or checkout these
unless you are developing the rwloadsim code or always want the latest.
If you use the development or master branch, you _must_ do compilation yourself;
If you use a development or master branch, you _must_ do compilation yourself;
no binaries are released.

At present, branch 3.0.6 is the release branch.
At present, branch 3.1.0 is the release branch.

Please see [CHANGELOG.md](CHANGELOG.md) for details.

Expand Down
95 changes: 51 additions & 44 deletions admin/.vim/syntax/rwl.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: RWP*Worklod Simualator
" Maintainer: Bjørn Kisbye Ensig
" Latest Revision: 11 Jan 2023
" Latest Revision: 13 sep 2023

if exists("b:current_syntax")
finish
Expand All @@ -22,7 +22,8 @@ syn keyword rwlKeyword abort function bindout between clob blob raw date ignoree
syn keyword rwlKeyword getenv system opensessioncount activesessioncount serverrelease
syn keyword rwlKeyword unsigned hexadecimal octal printf fprintf encode decode elseif
syn keyword rwlKeyword connectionpool connectionclass sprintf global querynotification
syn keyword rwlKeyword normalrandom statisticsonly
syn keyword rwlKeyword normalrandom statisticsonly ceil trunc floor
syn keyword rwlKeyword lobprefetch readlob writelob
syn keyword rwlKeyword getrusage instr instrb regexextract nextgroup=rwlNumber skipwhite

syn match rwlVariable "\$#"
Expand All @@ -45,56 +46,59 @@ syn match rwlString '\$[A-Z][_A-Za-z0-9]*'
" Note that these include anything starting with 'create'
" but some of these gets modified to plsql below
syn region rwlSQL start='/\*' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\ccreate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cselect[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cinsert[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cupdate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cdelete[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\ccall[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cdrop[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cmerge[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\calter[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cwith[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\ctruncate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\caudit[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cnoaudit[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\crevoke[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\crename[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cpurge[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\csavepoint[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\canalyze[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cgrant[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\ccreate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cselect[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cinsert[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cupdate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cdelete[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\ccall[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cdrop[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cmerge[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\calter[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cwith[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\ctruncate[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\caudit[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cnoaudit[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\crevoke[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\crename[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cpurge[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\csavepoint[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\canalyze[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cgrant[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
" the double keyword ones follow here
syn region rwlSQL start='\ccomment[ \n\t]\+on[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cexplain[ \n\t]\+plan[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cflashback[ \n\t]\+database[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cflashback[ \n\t]\+table[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\clock[ \n\t]\+table[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cset[ \n\t]\+constraint[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cset[ \n\t]\+transaction[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cset[ \n\t]\+role[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cassociate[ \t\n]\+statistics[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\cdisassociate[ \t\n]\+statistics[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\ccomment[ \n\t]\+on[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cexplain[ \n\t]\+plan[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cflashback[ \n\t]\+database[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cflashback[ \n\t]\+table[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\clock[ \n\t]\+table[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cset[ \n\t]\+constraint[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cset[ \n\t]\+transaction[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cset[ \n\t]\+role[ \t\n]' end='\(\(^[ \n\t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cassociate[ \t\n]\+statistics[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
syn region rwlSQL start='\<\cdisassociate[ \t\n]\+statistics[ \t\n]' end='\(\(^[ \t]*[/.]$\)\|\(;$\)\)'
" PL/SQL that requires . or /
" Note that these MUST come after the above as they change the definition
" of a number of statement beginning with 'create' that require PL/SQL
" termination
syn region rwlSQL start='\cbegin[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\cdeclare[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\cbegin[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\cdeclare[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='--' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?trigger[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?type[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?java[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?function[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?procedure[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?package[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?library[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?trigger[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?type[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?java[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?function[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?procedure[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?package[ \t\n]' end='\(^[ \t]*[/.]$\)'
syn region rwlSQL start='\<\ccreate[ \t\n]\+\(or[ \t\n]\+replace[ \t\n]\+\)\?library[ \t\n]' end='\(^[ \t]*[/.]$\)'

syn match rwlDirective '\$statistics:basic'
syn match rwlDirective '\$statistics:histograms'
syn match rwlDirective '\$statistics:all'
syn match rwlDirective '\$ampersand:on'
syn match rwlDirective '\$ampersand:off'
syn match rwlDirective '\$queueeverytiming:on'
syn match rwlDirective '\$queueeverytiming:off'
syn match rwlDirective '\$errordetail:on'
syn match rwlDirective '\$errortime:on'
syn match rwlDirective '\$errortime:off'
syn match rwlDirective '\$sessionpool_no_rlb:on'
Expand Down Expand Up @@ -153,12 +157,15 @@ syn match rwlDirective '\$useroption:[a-zA-Z][-0-9a-zA-Z_]*'
syn match rwlDirective '\$useroption:[a-zA-Z][-0-9a-zA-Z_]*:"[^"]*"'
syn match rwlDirective '\$userswitch:[a-zA-Z][-0-9a-zA-Z_]*'
syn match rwlDirective '\$userswitch:[a-zA-Z][-0-9a-zA-Z_]*:"[^"]*"'
syn match rwlDirective '\$debugon:[0-9a-fA-F][0-9a-fA-F]*'
syn match rwlDirective '\$debugoff:[0-9a-fA-F][0-9a-fA-F]*'
syn match rwlDirective '\$debugon:0[xX][0-9a-fA-F][0-9a-fA-F]*'
syn match rwlDirective '\$debugoff:0[xX][0-9a-fA-F][0-9a-fA-F]*'
syn match rwlDirective '\$debugon:[0-9A-Za-z][0-9a-zA-Z,]*'
syn match rwlDirective '\$debugoff:[0-9A-Za-z][0-9a-zA-Z,]*'
syn match rwlDirective '\$include:"[^"<>]*"'
syn match rwlDirective '\$include:<[^"<>]*>'
syn match rwlDirective '\$sqllogging:file:"[^"<>]*"'
syn match rwlDirective '\$sqllogging:append:"[^"<>]*"'
syn match rwlDirective '\$sqllogging:stdout'
syn match rwlDirective '\$sqllogging:stderr'
syn match rwlDirective '\$sqllogging:off'
syn match rwlDirective '\$if[^o]'
syn match rwlDirective '\$then'
syn match rwlDirective '\$else'
Expand Down
4 changes: 3 additions & 1 deletion admin/rwlgrants.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
-- as shown at https://oss.oracle.com/licenses/upl/

-- History
-- bengsig 8-aug-2023 - Missing grant to PERSEC
-- bengsig 2017 - Creation

-- Use this if you want an extra user
Expand All @@ -14,7 +15,7 @@
-- below to match your other schema
--
-- Note that we explicitly disallow updates
-- and deletes such that users cannot
-- and deletes when possible such that users cannot
-- modify other users results
--
grant insert,select on HISTOGRAM to rwlpublic;
Expand All @@ -23,6 +24,7 @@ grant insert,select on RUNCPU to rwlpublic;
grant insert,select on RUNRES to rwlpublic;
grant insert,select on RWLCPU to rwlpublic;
grant insert,select on RWLRUN to rwlpublic;
grant insert,update,select on PERSEC to rwlpublic;
grant update(dbname) on rwlrun to rwlpublic;
grant update(dbversion) on rwlrun to rwlpublic;
grant update(nattr1) on rwlrun to rwlpublic;
Expand Down
13 changes: 13 additions & 0 deletions bin/ashplot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# RWP*Load Simulator
#
# Copyright (c) 2021 Oracle Corporation
# Licensed under the Universal Permissive License v 1.0
# as shown at https://oss.oracle.com/licenses/upl/
#
# call rwloadsim -u ashplot.rwl

# bengsig 27-nov-2023 - Creation

rwloadsim --pretend-gen-banner='RWP*ASH Plot' -u ashplot.rwl "$@"
3 changes: 2 additions & 1 deletion bin/mtitcreate
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#
# History
#
# bengsig 5-sep-2023 mtit_create.sql -> mtit_create.rwl
# bengsig 10-may-2023 Creation

. oltp-setup-env
Expand All @@ -18,7 +19,7 @@ fi
unset RWLOLTP_SIDE
eval `rwloadsim -q parameters2shell.rwl`

sqlplus $rwl_aw1_username/$rwl_aw1_password@$normal_connect @mtit_create.sql
rwloadsim mtit_create.rwl
sqlplus $rwl_aw1_username/$rwl_aw1_password@$normal_connect @mtit_grant.sql $rwl_run1_username
sqlplus $rwl_aw1_username/$rwl_aw1_password@$normal_connect @mtit_grant.sql $rwl_run2_username
sqlplus $rwl_run1_username/$rwl_run1_password@$normal_connect @mtit_synonym.sql $rwl_aw1_username
Expand Down
11 changes: 6 additions & 5 deletions bin/mtitplot
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Changes:
#
# bengsig 17-jul-2023 Modify plot colors
# bengsig 10-may-2023 Creation

. oltp-setup-env
Expand Down Expand Up @@ -263,14 +264,14 @@ set ylabel "thousand rows per second per process"
set terminal png size imgwidth,480
set output "$awrdirectory$subdir$runnumber/${runnumber}_tp.png"
plot "$resultsdir$subdir${runnumber}/mtit.csv" using 1:2 with lines lw $lw lc rgb "blue" title "1", \
plot "$resultsdir$subdir${runnumber}/mtit.csv" using 1:2 with lines lw $lw lc rgb "red" title "1", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:3 with lines lw $lw lc rgb "cyan" title "2", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:4 with lines lw $lw lc rgb "dark-green" title "3", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:5 with lines lw $lw lc rgb "light-green" title "4", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:6 with lines lw $lw lc rgb "red" title "5", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:4 with lines lw $lw lc rgb "green" title "3", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:5 with lines lw $lw lc rgb "magenta" title "4", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:6 with lines lw $lw lc rgb "blue" title "5", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:7 with lines lw $lw lc rgb "dark-orange" title "6", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:8 with lines lw $lw lc rgb "orange" title "7", \
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:9 with lines lw $lw lc rgb "green" title "8"
"$resultsdir$subdir${runnumber}/mtit.csv" using 1:9 with lines lw $lw lc rgb "dark-green" title "8"
set terminal svg $svgmouse size imgwidth,480 $dynamic
Expand Down
Loading

0 comments on commit 69a870c

Please sign in to comment.