A special unique number for each session

Use and application of the eValid server loading (LoadTest) capability. And in the cloud computing context for monitoring and loading.

A special unique number for each session

Postby blaineN » Wed Nov 02, 2011 1:50 pm

I need to have a special unique number for each session that I run in LoadTest mode...do you have a simple way to generate a unique identifier?
blaineN
 
Posts: 1
Joined: Wed Nov 02, 2011 1:46 pm

Re: A special unique number for each session

Postby eValid » Thu Nov 03, 2011 12:44 pm

blaineN wrote:I need to have a special unique number for each session that I run in LoadTest mode...do you have a simple way to generate a unique identifier?
There is a very simple way to do this that we use all the time: We simply use the current clock value measured to the nearest second.

OK, yes, theoretically it is not unique, but if you have a string like 2011.11.03.13.45.45 -- in other words, the current date to the nearest second, then that is unique enough "for all practical purposes."

You can get those values from the eValid Reserved Variables by adding them into your script as parameters. They look like this $_Year, $_Date, $_Hour, $_Minute, $_Second in your script, and the values that appear based on those parameters are picked up from your machine at the time you run your script. So they will be unique each time.

(The big assumption is that you don't have scripts starting more often than every 1 second...but in that case, we recommend a Delay 1001 command to make even that rare case impossible.)

eValid Scripting
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Performance/Load Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons