Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 27925 invoked from network); 12 May 2004 22:31:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 May 2004 22:31:05 -0000 Received: (qmail 77773 invoked by uid 500); 12 May 2004 22:31:17 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 77704 invoked by uid 500); 12 May 2004 22:31:16 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 77662 invoked by uid 98); 12 May 2004 22:31:16 -0000 Received: from guy.ferraiolo@cnet.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(216.239.116.251):. Processed in 0.164789 secs); 12 May 2004 22:31:16 -0000 X-Qmail-Scanner-Mail-From: guy.ferraiolo@cnet.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(216.239.116.251):. Processed in 0.164789 secs) Received: from unknown (HELO cn-sfo1-mail-relay2.cnet.cnwk) (216.239.116.251) by hermes.apache.org with SMTP; 12 May 2004 22:31:15 -0000 Received: from cnet30.cnet.cnwk (cnet30.cnet.cnwk [10.16.81.108]) by cn-sfo1-mail-relay2.cnet.cnwk (8.12.10/8.12.10) with SMTP id i4CMTwUC013364 for ; Wed, 12 May 2004 15:30:37 -0700 (PDT) X-Spam-Filter: check_local@cn-sfo1-mail-relay2.cnet.cnwk by digitalanswers.org Content-class: urn:content-classes:message Subject: RE: fixed range for random variables MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 12 May 2004 15:29:24 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Message-ID: <161E04AB9955D54E826FD8636057855401CC626E@cnet54.cnet.cnwk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: fixed range for random variables Thread-Index: AcQ4JmXJJgaer6eISmOtKK8QO/JUtQASfeXQ From: "Guy Ferraiolo" To: X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N A friend has suggested that you might want to consider allowing ${name=3Drand(41)} as a construct similar to :41? Guy > -----Original Message----- > From: Jacek Prucia [mailto:jacek.prucia@acn.waw.pl] > Sent: Wednesday, May 12, 2004 9:37 AM > To: test-dev@httpd.apache.org > Subject: fixed range for random variables >=20 >=20 >=20 > Really nifty flood feature is the ability to initialize variable to > random value. Using following construct: ${=3Dname} 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: >=20 > responsetemplate=3D"http://www.example.com/getArticle?id=3D{=3Dart_id} >=20 > The problem is that range for random values is 0 - RAND_MAX > (which is 2147483647 on my system). Not every database out=20 > 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. >=20 > Right now the range can be specified as: >=20 > 5:24 > -12:79 > :41 (means 0:41) > 123: (means 123:RAND_MAX) >=20 > Natural choice would be to use following construct for assigning fixed > range: >=20 > ${5:24=3Dname} >=20 > This just extends existing concept, but also look's kinda odd. I would > like to replace it with more general syntax: >=20 > ${name=3Drand(5:24)} >=20 > Is it okay with everybody? Please speak up if that violates anything. >=20 > regards > -- > Jacek Prucia >=20