*: make receiver names consistent

This commit is contained in:
Anthony Romano 2017-09-12 03:41:40 -07:00
parent 98e4a05068
commit 4fa1dd196c
4 changed files with 13 additions and 13 deletions

View File

@ -242,4 +242,4 @@ func (e *Election) Key() string { return e.leaderKey }
func (e *Election) Rev() int64 { return e.leaderRev } func (e *Election) Rev() int64 { return e.leaderRev }
// Header is the response header from the last successful election proposal. // 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 }

View File

@ -180,8 +180,8 @@ func (kv *kvPrefix) unprefixTxnResponse(resp *clientv3.TxnResponse) {
} }
} }
func (p *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) { func (kv *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) {
return prefixInterval(p.pfx, key, end) return prefixInterval(kv.pfx, key, end)
} }
func (kv *kvPrefix) prefixCmps(cs []clientv3.Cmp) []clientv3.Cmp { func (kv *kvPrefix) prefixCmps(cs []clientv3.Cmp) []clientv3.Cmp {

View File

@ -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) b := bi.(*treeIndex)
if a.tree.Len() != b.tree.Len() { if ti.tree.Len() != b.tree.Len() {
return false return false
} }
equal := true equal := true
a.tree.Ascend(func(item btree.Item) bool { ti.tree.Ascend(func(item btree.Item) bool {
aki := item.(*keyIndex) aki := item.(*keyIndex)
bki := b.tree.Get(item).(*keyIndex) bki := b.tree.Get(item).(*keyIndex)
if !aki.equal(bki) { if !aki.equal(bki) {

View File

@ -118,20 +118,20 @@ func (sp *secondPoints) getTimeSeries() TimeSeries {
return tslice return tslice
} }
func (ts TimeSeries) String() string { func (t TimeSeries) String() string {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
wr := csv.NewWriter(buf) wr := csv.NewWriter(buf)
if err := wr.Write([]string{"UNIX-SECOND", "MIN-LATENCY-MS", "AVG-LATENCY-MS", "MAX-LATENCY-MS", "AVG-THROUGHPUT"}); err != nil { if err := wr.Write([]string{"UNIX-SECOND", "MIN-LATENCY-MS", "AVG-LATENCY-MS", "MAX-LATENCY-MS", "AVG-THROUGHPUT"}); err != nil {
log.Fatal(err) log.Fatal(err)
} }
rows := [][]string{} rows := [][]string{}
for i := range ts { for i := range t {
row := []string{ row := []string{
fmt.Sprintf("%d", ts[i].Timestamp), fmt.Sprintf("%d", t[i].Timestamp),
ts[i].MinLatency.String(), t[i].MinLatency.String(),
ts[i].AvgLatency.String(), t[i].AvgLatency.String(),
ts[i].MaxLatency.String(), t[i].MaxLatency.String(),
fmt.Sprintf("%d", ts[i].ThroughPut), fmt.Sprintf("%d", t[i].ThroughPut),
} }
rows = append(rows, row) rows = append(rows, row)
} }