More periods

Signed-off-by: Marc Tuduri <marctc@protonmail.com>
This commit is contained in:
Marc Tuduri 2023-10-18 11:53:42 +02:00
parent af7c31ee10
commit 1ce066e51c
No known key found for this signature in database
GPG key ID: 761973D5AE312AF4

View file

@ -2350,38 +2350,38 @@ func TestFloatHistogramSize(t *testing.T) {
}{ }{
{ {
"without spans and buckets", "without spans and buckets",
&FloatHistogram{ // 8 bytes &FloatHistogram{ // 8 bytes.
CounterResetHint: 0, // 1 byte CounterResetHint: 0, // 1 byte.
Schema: 1, // 4 bytes Schema: 1, // 4 bytes.
ZeroThreshold: 0.01, // 8 bytes ZeroThreshold: 0.01, // 8 bytes.
ZeroCount: 5.5, // 8 bytes ZeroCount: 5.5, // 8 bytes.
Count: 3493.3, // 8 bytes Count: 3493.3, // 8 bytes.
Sum: 2349209.324, // 8 bytes Sum: 2349209.324, // 8 bytes.
PositiveSpans: nil, // 24 bytes PositiveSpans: nil, // 24 bytes.
PositiveBuckets: nil, // 24 bytes PositiveBuckets: nil, // 24 bytes.
NegativeSpans: nil, // 24 bytes NegativeSpans: nil, // 24 bytes.
NegativeBuckets: nil, // 24 bytes NegativeBuckets: nil, // 24 bytes.
}, },
8 + 4 + 4 + 8 + 8 + 8 + 8 + 24 + 24 + 24 + 24, 8 + 4 + 4 + 8 + 8 + 8 + 8 + 24 + 24 + 24 + 24,
}, },
{ {
"complete struct", "complete struct",
&FloatHistogram{ // 8 bytes &FloatHistogram{ // 8 bytes.
CounterResetHint: 0, // 1 byte CounterResetHint: 0, // 1 byte.
Schema: 1, // 4 bytes Schema: 1, // 4 bytes.
ZeroThreshold: 0.01, // 8 bytes ZeroThreshold: 0.01, // 8 bytes.
ZeroCount: 5.5, // 8 bytes ZeroCount: 5.5, // 8 bytes.
Count: 3493.3, // 8 bytes Count: 3493.3, // 8 bytes.
Sum: 2349209.324, // 8 bytes Sum: 2349209.324, // 8 bytes.
PositiveSpans: []Span{ // 24 bytes PositiveSpans: []Span{ // 24 bytes.
{-2, 1}, // 2 * 4 bytes {-2, 1}, // 2 * 4 bytes.
{2, 3}, // 2 * 4 bytes {2, 3}, // 2 * 4 bytes.
}, },
PositiveBuckets: []float64{1, 3.3, 4.2, 0.1}, // 24 bytes + 4 * 8 bytes PositiveBuckets: []float64{1, 3.3, 4.2, 0.1}, // 24 bytes + 4 * 8 bytes.
NegativeSpans: []Span{ // 24 bytes NegativeSpans: []Span{ // 24 bytes.
{3, 2}, // 2 * 4 bytes {3, 2}, // 2 * 4 bytes.
{3, 2}}, // 2 * 4 bytes {3, 2}}, // 2 * 4 bytes.
NegativeBuckets: []float64{3.1, 3, 1.234e5, 1000}, // 24 bytes + 4 * 8 bytes NegativeBuckets: []float64{3.1, 3, 1.234e5, 1000}, // 24 bytes + 4 * 8 bytes.
}, },
8 + 4 + 4 + 8 + 8 + 8 + 8 + (24 + 2*4 + 2*4) + (24 + 2*4 + 2*4) + (24 + 4*8) + (24 + 4*8), 8 + 4 + 4 + 8 + 8 + 8 + 8 + (24 + 2*4 + 2*4) + (24 + 2*4 + 2*4) + (24 + 4*8) + (24 + 4*8),
}, },