httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stock christian <>
Subject RE: fixed range for random variables
Date Thu, 19 Aug 2004 22:53:31 GMT
yo no entiendo nada de su mail o usted me manda eso en EspaƱol o frances gracias si no no
me manda mas message
je ne comprend rien a votre mail ou vous m'ecrivez en Esapgnol ou en Francais si non je me
passe de vos mail merci

Guy Ferraiolo <> wrote:
Is this in the source archive now?



-----Original Message-----
From: Jacek Prucia [] 
Sent: Wednesday, May 12, 2004 9:37 AM
Subject: fixed range for random variables

Really nifty flood feature is the ability to initialize variable to
random value. Using following construct: ${=name} inside requesttemplate
causes flood to create variable 'name', and assign it a value obtained
by calling rand/lrand48/random. Consider a typical scenario, where you
would like to fetch some item (say article) from database using random
index. Here's an example:


The problem is that range for random values is 0 - RAND_MAX (which is
2147483647 on my system). Not every database out there can be proud to
have (calls random...) 27667 articles handy. So we need fixed range for
random variables, which is what I have already written. The problem is
how we integrate this into flood.

Right now the range can be specified as:

:41 (means 0:41)
123: (means 123:RAND_MAX)

Natural choice would be to use following construct for assigning fixed


This just extends existing concept, but also look's kinda odd. I would
like to replace it with more general syntax:


Is it okay with everybody? Please speak up if that violates anything.

Jacek Prucia


  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message