-
Mauro Carvalho Chehab authored
This test is expected to run under a certain time defined by a command line parameter (by default, 2s). In order to achive the specified time, the baseline() function tries to estimate the value of a counter that will get the minimal amount of interaction to wait for > 0.1s. However, currently, the baseline estimation is broken, returning a too big number, as it is measuring the memcpy() time, instead of actually gem_execbuf(). Due to that, a default test without passing any command line parameter would take more than 1.5 years to output the first benchmark data! Fix it by using the same logic that it is inside run() at the baseline time estimation. Before this patch, baseline could return 399242693. After it, it now return 20. That means an interval of about 120 ms at the code which runs a gem_execbuf() loop, which should be good enough to ensure that the tests won't take too long, and will approximately match the time specified by the excecution paramete...