+ public Throughput(Long periodMs, Long count, Unit unit) {
+ if (unit.equals(Unit.s))
+ value = ((double) count * 1000d) / periodMs;
+ else if (unit.equals(Unit.m))
+ value = ((double) count * 60d * 1000d) / periodMs;
+ else if (unit.equals(Unit.h))
+ value = ((double) count * 60d * 60d * 1000d) / periodMs;
+ else if (unit.equals(Unit.d))
+ value = ((double) count * 24d * 60d * 60d * 1000d) / periodMs;
+ else
+ throw new ArgeoException("Unsupported unit " + unit);
+ this.unit = unit;
+ }
+