// Reset bar and set new total count
// Does effect only on finished bar
420355
func (pb *ProgressBar) Reset(total int) *ProgressBar {
	pb.mu.Lock()
	defer pb.mu.Unlock()
	if pb.isFinish {
		pb.SetTotal(total).Set(0)
		atomic.StoreInt64(&pb.previous, 0)
	}
	return pb
}
1319907
func (s *GetReusableDelegationSetLimitOutput) SetCount(v int64) *GetReusableDelegationSetLimitOutput {
	s.Count = &v
	return s
}
107484
func (pb *ProgressBar) SetTotal64(total int64) *ProgressBar {
	atomic.StoreInt64(&pb.Total, total)
	return pb
}
572084
func (c *CountingBloomFilter) Reset() *CountingBloomFilter {
	c.buckets.Reset()
	c.count = 0
	return c
}
206552
func (c *Client) SetRetryCount(count int) *Client {
	c.RetryCount = count
	return c
}
78557
func (bar *StatusBar) Clear(writer io.Writer) {
	bar.Lock()
	defer bar.Unlock()

	if bar.last != "" {
		fmt.Fprint(writer, "\x1b[2K")
	}

	bar.last = ""
}
1231008
func (ts *TiDBStatement) Reset() {
	for i := range ts.boundParams {
		ts.boundParams[i] = nil
	}

	// closing previous ResultSet if it exists
	if ts.rs != nil {
		terror.Call(ts.rs.Close)
		ts.rs = nil
	}
}
76321
func (s *QueryOutput) SetCount(v int64) *QueryOutput {
	s.Count = &v
	return s
}
63711
func (pb *ProgressBar) SetTotal(total int) *ProgressBar {
	return pb.SetTotal64(int64(total))
}
243547
func (r *BodyWithCallback) ResetProgress() error {
	return r.c(r.totalSize, r.readSize, -int(r.readSize))
}
1265717
func (t *Tracker) Reset() {
	t.Lock()
	defer t.Unlock()

	t.last = time.Now()
}
1241080
func (s *InventoryDeletionSummary) SetTotalCount(v int64) *InventoryDeletionSummary {
	s.TotalCount = &v
	return s
}
566031
func (s *Reservation) SetCount(v int64) *Reservation {
	s.Count = &v
	return s
}
511561
func (s *SACKScoreboard) Reset() {
	s.ranges = btree.New(defaultBtreeDegree)
	s.sacked = 0
}
357689
func (m *Monitor) reset(sampleTime time.Duration) {
	m.bytes += m.sBytes
	m.samples++
	m.sBytes = 0
	m.sLast = sampleTime
}
373614
func (d *Buzhash64) Reset() {
	d.window = d.window[:0]
	d.oldest = 0
	d.sum = 0
}
597052
func (s *DeleteReservationOutput) SetCount(v int64) *DeleteReservationOutput {
	s.Count = &v
	return s
}