static void FormatPhaseTimes(StatisticsSerializer &ss, const char *name, int64_t *times) { ss.beginObject(name); for (unsigned i = 0; phases[i].name; i++) ss.appendIfNonzeroMS(phases[i].name, t(times[phases[i].index])); ss.endObject(); }
static void FormatPhaseTimes(StatisticsSerializer& ss, const char* name, int64_t (*times)[PHASE_LIMIT]) { ss.beginObject(name); for (AllPhaseIterator iter(times); !iter.done(); iter.advance()) { Phase phase; size_t dagSlot; iter.get(&phase, &dagSlot); ss.appendIfNonzeroMS(phases[phase].name, t(times[dagSlot][phase])); } ss.endObject(); }