I've been playing around with the ApacheBench (ab) command line utility but I'm not sure if it's the right tool for what I'm trying to do.
I was running 10 concurrent and 10 requests doing an INSERT into a MySQL table and looking at round(microtime(1) * 10000)
to see if I was getting the same values.
I would like to know if using delayed execution usleep()
is enough to prevent two simultaneous requests getting the same value on the same box, or is time_sleep_until
better.
I know I could set more entropy with uniqid()
.
So I'm just wondering if using delayed execution will be enough to prevent two exact time stamps.