func (rs *RunStatistics) StartPartition() {
	rs.currentPartitionStartTime = time.Now()
}
StartPartition tracks the beginning of the processing of a partition
package stats
import (
	"time"
	"github.com/go-sif/sif/stats"
)
const statisticRollingWindows = 5
type RunStatistics struct {
	started                     bool
	startTime                   time.Time
	totalRuntime                int64
	rowsProcessed               []int64
	partitionsProcessed         []int64
	recentPartitionRuntimes     []int64  
	recentPartitionRuntimesHead int
	stageRuntimes               []int64  
	transformPhaseRuntimes      []int64  
	shufflePhaseRuntimes        []int64  
	finished                  bool
	currentStageStartTime     time.Time
	currentTransformStartTime time.Time
	currentShuffleStartTime   time.Time
	currentPartitionStartTime time.Time
}
func (rs *RunStatistics) Start(numStages int) {
	if !rs.started {
		rs.startTime = time.Now()
		rs.rowsProcessed = make([]int64, numStages)
		rs.partitionsProcessed = make([]int64, numStages)
		rs.recentPartitionRuntimes = make([]int64, statisticRollingWindows)
		rs.stageRuntimes = make([]int64, statisticRollingWindows)
		rs.transformPhaseRuntimes = make([]int64, statisticRollingWindows)
		rs.shufflePhaseRuntimes = make([]int64, statisticRollingWindows)
	}
}
func (rs *RunStatistics) Finish() {
	rs.totalRuntime = time.Since(rs.startTime).Nanoseconds()
}
func (rs *RunStatistics) StartStage() {
	rs.currentStageStartTime = time.Now()
}
func (rs *RunStatistics) EndStage(sidx int) {
	rs.stageRuntimes[sidx] = time.Since(rs.currentStageStartTime).Nanoseconds()
	rs.recentPartitionRuntimes = make([]int64, statisticRollingWindows)
	rs.recentPartitionRuntimesHead = 0
}
func (rs *RunStatistics) StartTransform() {
	rs.currentTransformStartTime = time.Now()
}
func (rs *RunStatistics) EndTransform(sidx int) {
	rs.transformPhaseRuntimes[sidx] = time.Since(rs.currentTransformStartTime).Nanoseconds()
}
func (rs *RunStatistics) StartShuffle() {
	rs.currentShuffleStartTime = time.Now()
}
func (rs *RunStatistics) EndShuffle(sidx int) {
	rs.shufflePhaseRuntimes[sidx] = time.Since(rs.currentShuffleStartTime).Nanoseconds()
}