Fix divide by zero bug in benchmark workers

This change checks for a zero denominator before attempting the
relevant calculations, otherwise allowing the statistic to
default to zero.

Change-Id: I3d21652e447430eccac4723348eea5f58384accd
Merge "Fix divide by zero bug in benchmark workers"