Re: ping: [PATCH 0/4 V3] GDB Performance testing

Yao Qi
2013-10-24T14:13:08Z

On 10/24/2013 04:49 PM, Agovic, Sanimir wrote:
> + def measure(self, func, id):
> + """Measure the operations done by func with a collection of measurements."""
> + for m in self.measurements:
> + m.start(id)
> +
> + # Enable GC, force GC and disable GC before running test in order to reduce
> + # the interference from GC.
> + gc.enable()
> + gc.collect()
> + gc.disable()
> +
> + func()
> +
> + gc.enable()
> I`d rather exclude gc cycles completely from the measurements or include gc collection
> _after_ you run your perf test. Otherwise the results will depend on the order the perf
> tests are run.

Right, we should disable gc before measurements are started and enable
gc again when measurements are stopped. I'll update the patch.

--
Yao (é½å°§)