mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: make receiver names consistent
This commit is contained in:
parent
98e4a05068
commit
4fa1dd196c
@ -242,4 +242,4 @@ func (e *Election) Key() string { return e.leaderKey }
|
||||
func (e *Election) Rev() int64 { return e.leaderRev }
|
||||
|
||||
// Header is the response header from the last successful election proposal.
|
||||
func (m *Election) Header() *pb.ResponseHeader { return m.hdr }
|
||||
func (e *Election) Header() *pb.ResponseHeader { return e.hdr }
|
||||
|
@ -180,8 +180,8 @@ func (kv *kvPrefix) unprefixTxnResponse(resp *clientv3.TxnResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) {
|
||||
return prefixInterval(p.pfx, key, end)
|
||||
func (kv *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) {
|
||||
return prefixInterval(kv.pfx, key, end)
|
||||
}
|
||||
|
||||
func (kv *kvPrefix) prefixCmps(cs []clientv3.Cmp) []clientv3.Cmp {
|
||||
|
@ -221,16 +221,16 @@ func compactIndex(rev int64, available map[revision]struct{}, emptyki *[]*keyInd
|
||||
}
|
||||
}
|
||||
|
||||
func (a *treeIndex) Equal(bi index) bool {
|
||||
func (ti *treeIndex) Equal(bi index) bool {
|
||||
b := bi.(*treeIndex)
|
||||
|
||||
if a.tree.Len() != b.tree.Len() {
|
||||
if ti.tree.Len() != b.tree.Len() {
|
||||
return false
|
||||
}
|
||||
|
||||
equal := true
|
||||
|
||||
a.tree.Ascend(func(item btree.Item) bool {
|
||||
ti.tree.Ascend(func(item btree.Item) bool {
|
||||
aki := item.(*keyIndex)
|
||||
bki := b.tree.Get(item).(*keyIndex)
|
||||
if !aki.equal(bki) {
|
||||
|
@ -118,20 +118,20 @@ func (sp *secondPoints) getTimeSeries() TimeSeries {
|
||||
return tslice
|
||||
}
|
||||
|
||||
func (ts TimeSeries) String() string {
|
||||
func (t TimeSeries) String() string {
|
||||
buf := new(bytes.Buffer)
|
||||
wr := csv.NewWriter(buf)
|
||||
if err := wr.Write([]string{"UNIX-SECOND", "MIN-LATENCY-MS", "AVG-LATENCY-MS", "MAX-LATENCY-MS", "AVG-THROUGHPUT"}); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
rows := [][]string{}
|
||||
for i := range ts {
|
||||
for i := range t {
|
||||
row := []string{
|
||||
fmt.Sprintf("%d", ts[i].Timestamp),
|
||||
ts[i].MinLatency.String(),
|
||||
ts[i].AvgLatency.String(),
|
||||
ts[i].MaxLatency.String(),
|
||||
fmt.Sprintf("%d", ts[i].ThroughPut),
|
||||
fmt.Sprintf("%d", t[i].Timestamp),
|
||||
t[i].MinLatency.String(),
|
||||
t[i].AvgLatency.String(),
|
||||
t[i].MaxLatency.String(),
|
||||
fmt.Sprintf("%d", t[i].ThroughPut),
|
||||
}
|
||||
rows = append(rows, row)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user