ovid2

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
COPYRIGHT
SEE ALSO

NAME

ovid2.rwl − Generate random strings

SYNOPSIS

$include:<ovid2.rwl>

function ovidstring( integer w ) return string

function ovidstring2( integer l ) return string

DESCRIPTION

The ovid2.rwl script includes two functions that return a random string consisting of lower case Latin words separated by one blank. The words are between 1 and 15 characters long and are returned with the same probability that they occur in the first three chapters of Ovid’s "Metamorphoses".

The function ovidstring returns a string with the number of words provided by the argument which must be at least 1.

The function ovidstring2 returns a string that contains a number of words such that the return string has a length that is at most the number of characters provided as its argument. As it returns complete words, it may be up to 14 characters shorter and the smallest value for the length is 15.

Both functions are limited to a maximum of 32768 characters.

EXAMPLE

If you execute

printline ovidstring(7);

the output may be

vetera transierunt ecce facta sunt omnia nova

It is left as an exercise to the reader to calculate the probability that this output will be produced.

There are two demonstration files, ovid2test.rwl and ovid2test2.rwl, in the demo subdirectory of your rwloadsim distribution. The oltp workload is similarly using ovid2.rwl.

COPYRIGHT

Copyright © 2023 Oracle Corporation
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl

SEE ALSO

longoption(1rwl), include(1rwl), oltp(2rwl)