Skip to content

Commit 93c3bc8

Browse files
Codecov comments
1 parent f5bd18a commit 93c3bc8

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,37 @@ type TDigestInfo struct {
2929
totalCompressions int64
3030
}
3131

32-
// Compression
32+
// Compression - returns the compression of TDigestInfo instance
3333
func (info *TDigestInfo) Compression() int64 {
3434
return info.compression
3535
}
3636

37-
// Capacity
37+
// Capacity - returns the capacity of TDigestInfo instance
3838
func (info *TDigestInfo) Capacity() int64 {
3939
return info.capacity
4040
}
4141

42-
// MergedNodes
42+
// MergedNodes - returns the merged nodes of TDigestInfo instance
4343
func (info *TDigestInfo) MergedNodes() int64 {
4444
return info.mergedNodes
4545
}
4646

47-
// UnmergedNodes
47+
// UnmergedNodes - returns the unmerged nodes of TDigestInfo instance
4848
func (info *TDigestInfo) UnmergedNodes() int64 {
4949
return info.unmergedNodes
5050
}
5151

52-
// MergedWeight
52+
// MergedWeight - returns the merged weight of TDigestInfo instance
5353
func (info *TDigestInfo) MergedWeight() float64 {
5454
return info.mergedWeight
5555
}
5656

57-
// UnmergedWeight
57+
// UnmergedWeight - returns the unmerged weight of TDigestInfo instance
5858
func (info *TDigestInfo) UnmergedWeight() float64 {
5959
return info.unmergedWeight
6060
}
6161

62-
// TotalCompressions
62+
// TotalCompressions - returns the total compressions of TDigestInfo instance
6363
func (info *TDigestInfo) TotalCompressions() int64 {
6464
return info.totalCompressions
6565
}

client_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,9 @@ func TestClient_TdReset(t *testing.T) {
552552
info, err := client.TdInfo(key)
553553
assert.Nil(t, err)
554554
assert.Equal(t, 0.0, info.UnmergedWeight())
555+
assert.Equal(t, int64(0), info.TotalCompressions())
556+
assert.Equal(t, int64(100), info.Compression())
557+
assert.Equal(t, int64(610), info.Capacity())
555558
}
556559

557560
func TestClient_TdMerge(t *testing.T) {
@@ -583,6 +586,8 @@ func TestClient_TdMerge(t *testing.T) {
583586
info, err := client.TdInfo(key1)
584587
assert.Nil(t, err)
585588
assert.Equal(t, 10.0, info.UnmergedWeight()+info.MergedWeight())
589+
assert.Equal(t, int64(2), info.UnmergedNodes())
590+
assert.Equal(t, int64(2), info.MergedNodes())
586591
}
587592

588593
func TestClient_TdMinMax(t *testing.T) {

0 commit comments

Comments
 (0)