in go/distinct_count_serde_profile.go [50:86]
func (d *DistinctCountSerDeProfile) run() {
var (
sb = &strings.Builder{}
vIn = int64(0)
rawStats = &distinctCountSerdeStats{}
meanStats = &distinctCountSerdeStats{}
maxU = 1 << d.config.lgMaxU
minU = 1 << d.config.lgMinU
lastU = 0
)
debug.SetGCPercent(-1)
debug.SetMemoryLimit(math.MaxInt64)
d.setHeader(sb)
fmt.Println(sb.String())
sb.Reset()
for lastU < maxU {
nextU := minU
if lastU != 0 {
nextU = int(pwr2SeriesNext(d.config.uppo, uint64(lastU)))
}
lastU = nextU
sumStats := &distinctCountSerdeStats{}
trials := d.getNumTrials(nextU)
for t := 0; t < trials; t++ {
vIn = d.runTrial(rawStats, vIn, nextU)
sumStats.add(rawStats)
}
meanStats.makeMeanOf(sumStats, trials)
d.process(meanStats, trials, nextU, sb)
fmt.Println(sb.String())
sb.Reset()
}
}