httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Ferraiolo" <>
Subject RE: fixed range for random variables
Date Thu, 19 Aug 2004 16:18:39 GMT
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

View raw message