Sandor Szücs
2/25/2009 11:35:00 AM
On 24.02.2009, at 23:35, Juan Alvarez wrote:
> These are the results I get:
>
> user system total =20
> real
> Curl::Easy.http_get 0.070000 0.130000 0.200000 ( 26.319104)
> RestClient.get 0.970000 0.580000 1.550000 ( 23.557923)
>
> I get these results consistently where curb's user, system and total
> times are dramatically lower than Net::HTTP's. However, Net:HTTP is
> reported to run faster by the real column. Shouldn't the reported real
> time be consistent with the other columns?
No. "real" measures the time that is passed from start to finish.
Pseudocode
real_start =3D Time.now
yield # run test
real_end =3D Time.now
real_start.to_f - real_end.to_f
If the Kernel of your OS schedules another processes for, say 20 =20
seconds,
then the difference between total and real is >=3D 20 seconds.
I think the time called "real" should not be trusted in an evaluation.
regards, Sandor Sz=FCcs
--