// reset clears the current sample state in preparation for the next sample.
357689
func (m *Monitor) reset(sampleTime time.Duration) {
	m.bytes += m.sBytes
	m.samples++
	m.sBytes = 0
	m.sLast = sampleTime
}
742346
func (e *encoder) Reset() {
	e.ts = e.ts[:0]
	e.bytes = e.bytes[:0]
	e.enc.Reset()
}
17685
func (s *scanner) reset() {
	s.step = stateBeginValue
	s.parseState = s.parseState[0:0]
	s.err = nil
	if s.isRecordEmpty() {
		if s.length_data >= AVERAGE_LENGTH {
			s.stateRecord = make([]Record, 0, s.length_data/4) //capacity doesn't depends on the length whole value, but on the length of nested values. But predictively the large values have large nested values.
		} else {
			s.stateRecord = make([]Record, 0, s.length_data/2)
		}
	}
	s.inNumber = false
	s.endLiteral = false
	s.cached = false
	s.readPos = 0
	s.endTop = false
}
1346169
func (s *Scanner) Reset() {
	s.Step = stateBeginValue
	s.parseState = s.parseState[0:0]
	s.Err = nil
	s.redo = false
	s.endTop = false
}
1309861
func Reset() {
	states = stateMap{
		m: map[string]*remote.State{},
	}

	locks = lockMap{
		m: map[string]*state.LockInfo{},
	}
}
613496
func (s *Stream) Reset() error {
	err := s.stream.Reset()
	s.state.Lock()
	switch s.state.v {
	case streamOpen, streamCloseRead, streamCloseWrite:
		s.state.v = streamReset
		s.remove()
	}
	s.state.Unlock()
	return err
}
1328719
func (c *Context) reset() {
	c.Writer = &c.writermem
	c.Params = c.Params[0:0]
	c.handlers = nil
	c.index = -1
	c.Keys = nil
	c.Errors = c.Errors[0:0]
	c.Accepted = nil
}
1148074
func (prof *Profiler) Reset() error {
	prof.Buffer.Reset()
	return prof.Procer.Reset()
}
238688
func (stream *Stream) Reset(out io.Writer) {
	stream.out = out
	stream.buf = stream.buf[:0]
}
365272
func (d *RabinKarp64) Reset() {
	d.tables = nil
	d.value = 0
	d.window = d.window[:0]
	d.oldest = 0
	d.updateTables()
}
1191095
func (s *secrets) Reset() {
	s.mu.Lock()
	defer s.mu.Unlock()
	s.m = make(map[string]*api.Secret)
}
785234
func (s *Storage) Reset() {
	atomic.StoreInt64(&s.stat.TotalCount, 0)
	atomic.StoreInt64(&s.stat.Ios.PushSuccess, 0)
	atomic.StoreInt64(&s.stat.Ios.PushError, 0)
	atomic.StoreInt64(&s.stat.Android.PushSuccess, 0)
	atomic.StoreInt64(&s.stat.Android.PushError, 0)
}
1146680
func (cache *mapTxCache) Reset() {
	cache.mtx.Lock()
	cache.map_ = make(map[[sha256.Size]byte]*list.Element, cache.size)
	cache.list.Init()
	cache.mtx.Unlock()
}
767441
func (s *Store) Reset() {
	s.mu.Lock()
	s.metrics = make(map[string][]time.Duration)
	s.mu.Unlock()
	s.diffmu.Lock()
	s.diffs = make(map[string]*diff)
	s.diffmu.Unlock()
}
308780
func (tsh *tarsumHash) Reset() {
	// comply with hash.Hash and reset to the state hash had before any writes
	tsh.Hash.Reset()
	tarsum.WriteV1Header(tsh.hdr, tsh.Hash)
}
219212
func (m *metricMap) Reset() {
	m.mtx.Lock()
	defer m.mtx.Unlock()

	for h := range m.metrics {
		delete(m.metrics, h)
	}
}
841496
func (tsh *tarsumHash) Reset() {
	// comply with hash.Hash and reset to the state hash had before any writes
	tsh.Hash.Reset()
	WriteV1TarsumHeaders(tsh.hdr, tsh.Hash)
}