Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add possibility to record histogram with weight #252

Merged
merged 2 commits into from
Mar 21, 2024
Merged

add possibility to record histogram with weight #252

merged 2 commits into from
Mar 21, 2024

Conversation

MGaulia
Copy link
Collaborator

@MGaulia MGaulia commented Mar 21, 2024

Adding the possibility to record values for a histogram with a weight,

Solves #175

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@SokolAndrey SokolAndrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@MGaulia
Copy link
Collaborator Author

MGaulia commented Mar 21, 2024

Ran all unit tests locally
`
/usr/bin/make -f /Users/mgaulia/Uber/mgaulia-histogram-weight/Makefile -C /Users/mgaulia/Uber/mgaulia-histogram-weight test
go test -race -v ./...
? github.com/uber-go/tally/v4/example [no test files]
? github.com/uber-go/tally/v4/internal/cache [no test files]
=== RUN TestValueBucketsString
--- PASS: TestValueBucketsString (0.00s)
=== RUN TestDurationBucketsString
--- PASS: TestDurationBucketsString (0.00s)
=== RUN TestBucketPairsDefaultsToNegInfinityToInfinity
--- PASS: TestBucketPairsDefaultsToNegInfinityToInfinity (0.00s)
=== RUN TestBucketPairsSortsValueBuckets
--- PASS: TestBucketPairsSortsValueBuckets (0.00s)
=== RUN TestBucketPairsSortsDurationBuckets
--- PASS: TestBucketPairsSortsDurationBuckets (0.00s)
=== RUN TestMustMakeLinearValueBuckets
--- PASS: TestMustMakeLinearValueBuckets (0.00s)
=== RUN TestMustMakeLinearValueBucketsPanicsOnBadCount
--- PASS: TestMustMakeLinearValueBucketsPanicsOnBadCount (0.00s)
=== RUN TestMustMakeLinearDurationBuckets
--- PASS: TestMustMakeLinearDurationBuckets (0.00s)
=== RUN TestMustMakeLinearDurationBucketsPanicsOnBadCount
--- PASS: TestMustMakeLinearDurationBucketsPanicsOnBadCount (0.00s)
=== RUN TestMustMakeExponentialValueBuckets
--- PASS: TestMustMakeExponentialValueBuckets (0.00s)
=== RUN TestMustMakeExponentialValueBucketsPanicsOnBadCount
--- PASS: TestMustMakeExponentialValueBucketsPanicsOnBadCount (0.00s)
=== RUN TestMustMakeExponentialValueBucketsPanicsOnBadStart
--- PASS: TestMustMakeExponentialValueBucketsPanicsOnBadStart (0.00s)
=== RUN TestMustMakeExponentialValueBucketsPanicsOnBadFactor
--- PASS: TestMustMakeExponentialValueBucketsPanicsOnBadFactor (0.00s)
=== RUN TestMustMakeExponentialDurationBuckets
--- PASS: TestMustMakeExponentialDurationBuckets (0.00s)
=== RUN TestMustMakeExponentialDurationBucketsPanicsOnBadCount
--- PASS: TestMustMakeExponentialDurationBucketsPanicsOnBadCount (0.00s)
=== RUN TestMustMakeExponentialDurationBucketsPanicsOnBadStart
--- PASS: TestMustMakeExponentialDurationBucketsPanicsOnBadStart (0.00s)
=== RUN TestMustMakeExponentialDurationBucketsPanicsOnBadFactor
--- PASS: TestMustMakeExponentialDurationBucketsPanicsOnBadFactor (0.00s)
=== RUN TestBucketPairsNoRaceWhenSorted
--- PASS: TestBucketPairsNoRaceWhenSorted (0.00s)
=== RUN TestBucketPairsNoRaceWhenUnsorted
--- PASS: TestBucketPairsNoRaceWhenUnsorted (0.00s)
=== RUN TestKeyForPrefixedStringMaps
=== RUN TestKeyForPrefixedStringMaps/no_maps
=== RUN TestKeyForPrefixedStringMaps/disjoint_maps
=== RUN TestKeyForPrefixedStringMaps/map_overlap
--- PASS: TestKeyForPrefixedStringMaps (0.00s)
--- PASS: TestKeyForPrefixedStringMaps/no_maps (0.00s)
--- PASS: TestKeyForPrefixedStringMaps/disjoint_maps (0.00s)
--- PASS: TestKeyForPrefixedStringMaps/map_overlap (0.00s)
=== RUN TestInsertionSort
--- PASS: TestInsertionSort (0.00s)
=== RUN TestSanitizeIdentifierAllValidCharacters
--- PASS: TestSanitizeIdentifierAllValidCharacters (0.00s)
=== RUN TestSanitizeTestCases
--- PASS: TestSanitizeTestCases (0.00s)
=== RUN TestVerifyCachedTaggedScopesAlloc
--- PASS: TestVerifyCachedTaggedScopesAlloc (0.00s)
=== RUN TestVerifyOmitCardinalityMetricsTags
--- PASS: TestVerifyOmitCardinalityMetricsTags (0.00s)
=== RUN TestNewTestStatsReporterOneScope
--- PASS: TestNewTestStatsReporterOneScope (0.00s)
=== RUN TestNewTestStatsReporterManyScopes
--- PASS: TestNewTestStatsReporterManyScopes (0.00s)
=== RUN TestForEachScopeConcurrent
--- PASS: TestForEachScopeConcurrent (0.00s)
=== RUN TestCachedReporterInternalMetricsAlloc
--- PASS: TestCachedReporterInternalMetricsAlloc (0.00s)
=== RUN TestWriteTimerImmediately
--- PASS: TestWriteTimerImmediately (0.00s)
=== RUN TestWriteTimerClosureImmediately
--- PASS: TestWriteTimerClosureImmediately (0.00s)
=== RUN TestWriteReportLoop
--- PASS: TestWriteReportLoop (0.00s)
=== RUN TestWriteReportLoopDefaultInterval
--- PASS: TestWriteReportLoopDefaultInterval (2.00s)
=== RUN TestCachedReportLoop
--- PASS: TestCachedReportLoop (0.00s)
=== RUN TestCachedReporterFlushOnce
--- PASS: TestCachedReporterFlushOnce (0.00s)
=== RUN TestReporterFlushOnce
--- PASS: TestReporterFlushOnce (0.00s)
=== RUN TestWriteOnce
--- PASS: TestWriteOnce (0.00s)
=== RUN TestHistogramSharedBucketMetrics
--- PASS: TestHistogramSharedBucketMetrics (1.09s)
=== RUN TestConcurrentUpdates
--- PASS: TestConcurrentUpdates (0.20s)
=== RUN TestCounterSanitized
--- PASS: TestCounterSanitized (0.00s)
=== RUN TestCachedReporter
--- PASS: TestCachedReporter (0.00s)
=== RUN TestRootScopeWithoutPrefix
--- PASS: TestRootScopeWithoutPrefix (0.00s)
=== RUN TestRootScopeWithPrefix
--- PASS: TestRootScopeWithPrefix (0.00s)
=== RUN TestRootScopeWithDifferentSeparator
--- PASS: TestRootScopeWithDifferentSeparator (0.00s)
=== RUN TestSubScope
--- PASS: TestSubScope (0.00s)
=== RUN TestSubScopeClose
--- PASS: TestSubScopeClose (2.00s)
=== RUN TestTaggedSubScope
--- PASS: TestTaggedSubScope (0.00s)
=== RUN TestTaggedSanitizedSubScope
--- PASS: TestTaggedSanitizedSubScope (0.00s)
=== RUN TestTaggedExistingReturnsSameScope
--- PASS: TestTaggedExistingReturnsSameScope (0.00s)
=== RUN TestSnapshot
=== RUN TestSnapshot/attempt_0
=== RUN TestSnapshot/attempt_1
=== RUN TestSnapshot/attempt_2
--- PASS: TestSnapshot (0.00s)
--- PASS: TestSnapshot/attempt_0 (0.00s)
--- PASS: TestSnapshot/attempt_1 (0.00s)
--- PASS: TestSnapshot/attempt_2 (0.00s)
=== RUN TestSnapshotConcurrent
--- PASS: TestSnapshotConcurrent (0.00s)
=== RUN TestCapabilities
--- PASS: TestCapabilities (0.00s)
=== RUN TestCapabilitiesNoReporter
--- PASS: TestCapabilitiesNoReporter (0.00s)
=== RUN TestNilTagMerge
--- PASS: TestNilTagMerge (0.00s)
=== RUN TestScopeDefaultBuckets
--- PASS: TestScopeDefaultBuckets (0.00s)
=== RUN TestReturnByValue
--- PASS: TestReturnByValue (0.00s)
=== RUN TestScopeAvoidReportLoopRunOnClose
--- PASS: TestScopeAvoidReportLoopRunOnClose (0.00s)
=== RUN TestScopeFlushOnClose
--- PASS: TestScopeFlushOnClose (0.00s)
=== RUN TestCounter
--- PASS: TestCounter (0.00s)
=== RUN TestGauge
--- PASS: TestGauge (0.00s)
=== RUN TestTimer
--- PASS: TestTimer (0.00s)
=== RUN TestHistogramValueSamples
--- PASS: TestHistogramValueSamples (0.00s)
=== RUN TestHistogramDurationSamples
--- PASS: TestHistogramDurationSamples (0.00s)
=== RUN TestTestScopesNotPruned
--- PASS: TestTestScopesNotPruned (0.00s)
=== RUN TestNoDefunctSubscopes
--- PASS: TestNoDefunctSubscopes (0.00s)
PASS
ok github.com/uber-go/tally/v4 (cached)
=== RUN TestCallSuccess
--- PASS: TestCallSuccess (0.00s)
=== RUN TestCallFail
--- PASS: TestCallFail (0.00s)
PASS
ok github.com/uber-go/tally/v4/instrument (cached)
testing: warning: no tests to run
PASS
ok github.com/uber-go/tally/v4/internal/identity (cached) [no tests to run]
=== RUN TestConfigSimple
--- PASS: TestConfigSimple (0.00s)
=== RUN TestConfigMulti
--- PASS: TestConfigMulti (0.00s)
=== RUN TestIntegrationProcessFlushOnExit
Test 0 emitted:
[{my-timer {TIMER 0 0 456000000} 0 []} {my-counter {COUNTER 42 0 0} 0 []} {my-gauge {GAUGE 0 123 0} 0 []} {tally.internal.batch-size {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global} {bucketid 0012} {bucket 2048.000000-infinity}]} {tally.internal.num-batches {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-metrics {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-write-errors {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-tag-cache {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global}]}]
Test 1 emitted:
[{my-timer {TIMER 0 0 456000000} 0 []} {my-counter {COUNTER 42 0 0} 0 []} {my-gauge {GAUGE 0 123 0} 0 []} {tally.internal.batch-size {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global} {bucketid 0012} {bucket 2048.000000-infinity}]} {tally.internal.num-batches {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-metrics {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-write-errors {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-tag-cache {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global}]}]
Test 2 emitted:
[{my-timer {TIMER 0 0 456000000} 0 []} {my-counter {COUNTER 42 0 0} 0 []} {my-gauge {GAUGE 0 123 0} 0 []} {tally.internal.batch-size {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global} {bucketid 0012} {bucket 2048.000000-infinity}]} {tally.internal.num-batches {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-metrics {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-write-errors {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-tag-cache {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global}]}]
Test 3 emitted:
[{my-timer {TIMER 0 0 456000000} 0 []} {my-counter {COUNTER 42 0 0} 0 []} {my-gauge {GAUGE 0 123 0} 0 []} {tally.internal.batch-size {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global} {bucketid 0012} {bucket 2048.000000-infinity}]} {tally.internal.num-batches {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-metrics {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-write-errors {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-tag-cache {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global}]}]
Test 4 emitted:
[{my-timer {TIMER 0 0 456000000} 0 []} {my-counter {COUNTER 42 0 0} 0 []} {my-gauge {GAUGE 0 123 0} 0 []} {tally.internal.batch-size {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global} {bucketid 0012} {bucket 2048.000000-infinity}]} {tally.internal.num-batches {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-metrics {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-write-errors {COUNTER 0 0 0} 0 [{version 4.1.12} {host global} {instance global}]} {tally.internal.num-tag-cache {COUNTER 1 0 0} 0 [{version 4.1.12} {host global} {instance global}]}]
--- PASS: TestIntegrationProcessFlushOnExit (1.90s)
=== RUN TestReporter
--- PASS: TestReporter (0.01s)
=== RUN TestMultiReporter
--- PASS: TestMultiReporter (0.00s)
=== RUN TestNewReporterErrors
--- PASS: TestNewReporterErrors (0.00s)
=== RUN TestReporterRaceCondition
--- PASS: TestReporterRaceCondition (0.00s)
=== RUN TestReporterFinalFlush
--- PASS: TestReporterFinalFlush (0.00s)
=== RUN TestReporterNoPanicOnTimerAfterClose
--- PASS: TestReporterNoPanicOnTimerAfterClose (0.00s)
=== RUN TestReporterNoPanicOnFlushAfterClose
--- PASS: TestReporterNoPanicOnFlushAfterClose (0.00s)
=== RUN TestReporterHistogram
--- PASS: TestReporterHistogram (0.00s)
=== RUN TestBatchSizes
--- PASS: TestBatchSizes (0.03s)
=== RUN TestReporterSpecifyService
--- PASS: TestReporterSpecifyService (0.00s)
=== RUN TestIncludeHost
--- PASS: TestIncludeHost (0.01s)
=== RUN TestReporterResetTagsAfterReturnToPool
--- PASS: TestReporterResetTagsAfterReturnToPool (0.02s)
=== RUN TestReporterCommmonTagsInternal
--- PASS: TestReporterCommmonTagsInternal (0.00s)
=== RUN TestReporterHasReportingAndTaggingCapability
--- PASS: TestReporterHasReportingAndTaggingCapability (0.00s)
=== RUN TestM3ResourcePoolMetric
--- PASS: TestM3ResourcePoolMetric (0.00s)
=== RUN TestScope
--- PASS: TestScope (0.00s)
=== RUN TestScopeCounter
--- PASS: TestScopeCounter (0.00s)
=== RUN TestScopeGauge
--- PASS: TestScopeGauge (0.00s)
PASS
ok github.com/uber-go/tally/v4/m3 (cached)
=== RUN TestTBufferedReadTransport
--- PASS: TestTBufferedReadTransport (0.00s)
=== RUN TestTBufferedReadTransportEmptyFunctions
--- PASS: TestTBufferedReadTransportEmptyFunctions (0.00s)
=== RUN TestTCalcTransport
--- PASS: TestTCalcTransport (0.00s)
PASS
ok github.com/uber-go/tally/v4/m3/customtransports (cached)
? github.com/uber-go/tally/v4/m3/example [no test files]
? github.com/uber-go/tally/v4/m3/thrift/v1 [no test files]
? github.com/uber-go/tally/v4/m3/thrift/v2 [no test files]
=== RUN TestNewTMultiUDPClientTransport
--- PASS: TestNewTMultiUDPClientTransport (0.00s)
=== RUN TestNewTMultiUDPClientTransportBadAddress
--- PASS: TestNewTMultiUDPClientTransportBadAddress (0.00s)
=== RUN TestTMultiUDPTransportOpen
--- PASS: TestTMultiUDPTransportOpen (0.00s)
=== RUN TestTMultiUDPTransportOpenFail
--- PASS: TestTMultiUDPTransportOpenFail (0.00s)
=== RUN TestTMultiUDPTransportIsOpen
--- PASS: TestTMultiUDPTransportIsOpen (0.00s)
=== RUN TestTMultiUDPTransportIsNotOpen
--- PASS: TestTMultiUDPTransportIsNotOpen (0.00s)
=== RUN TestTMultiUDPTransportReadNotSupported
--- PASS: TestTMultiUDPTransportReadNotSupported (0.00s)
=== RUN TestTMultiUDPTransportRemainingBytesNotSupported
--- PASS: TestTMultiUDPTransportRemainingBytesNotSupported (0.00s)
=== RUN TestTMultiUDPTransportWrite
--- PASS: TestTMultiUDPTransportWrite (0.00s)
=== RUN TestTMultiUDPTransportWriteError
--- PASS: TestTMultiUDPTransportWriteError (0.00s)
=== RUN TestNewTUDPClientTransport
--- PASS: TestNewTUDPClientTransport (0.00s)
=== RUN TestNewTUDPServerTransportWithListenConfig
--- PASS: TestNewTUDPServerTransportWithListenConfig (0.00s)
=== RUN TestTUDPServerTransportIsOpen
--- PASS: TestTUDPServerTransportIsOpen (0.00s)
=== RUN TestWriteRead
--- PASS: TestWriteRead (0.00s)
=== RUN TestWriteByteReadByte
--- PASS: TestWriteByteReadByte (0.00s)
=== RUN TestReadByteEmptyPacket
--- PASS: TestReadByteEmptyPacket (0.00s)
=== RUN TestIndirectCloseError
--- PASS: TestIndirectCloseError (0.00s)
=== RUN TestDoubleCloseIsOK
--- PASS: TestDoubleCloseIsOK (0.00s)
=== RUN TestConnClosedReadWrite
--- PASS: TestConnClosedReadWrite (0.00s)
=== RUN TestHugeWrite
--- PASS: TestHugeWrite (0.00s)
=== RUN TestWriteByteLimit
--- PASS: TestWriteByteLimit (0.00s)
=== RUN TestFlushErrors
--- PASS: TestFlushErrors (0.00s)
=== RUN TestResetInFlush
--- PASS: TestResetInFlush (0.00s)
PASS
ok github.com/uber-go/tally/v4/m3/thriftudp (cached)
=== RUN TestMultiReporter
--- PASS: TestMultiReporter (0.00s)
=== RUN TestMultiCachedReporter
--- PASS: TestMultiCachedReporter (0.00s)
PASS
ok github.com/uber-go/tally/v4/multi (cached)
? github.com/uber-go/tally/v4/prometheus/example [no test files]
? github.com/uber-go/tally/v4/statsd/example [no test files]
? github.com/uber-go/tally/v4/tallymock [no test files]
=== RUN TestListenErrorCallsOnRegisterError
2024/03/21 14:58:29 tally prometheus reporter error: listen tcp 127.0.0.1:51615: bind: address already in use
--- PASS: TestListenErrorCallsOnRegisterError (1.00s)
=== RUN TestUnixDomainSocketListener
--- PASS: TestUnixDomainSocketListener (1.00s)
=== RUN TestTcpListener
=== RUN TestTcpListener/127.0.0.1:0
=== RUN TestTcpListener/tcp://127.0.0.1:0
=== RUN TestTcpListener/tcp4://127.0.0.1:0
--- PASS: TestTcpListener (3.01s)
--- PASS: TestTcpListener/127.0.0.1:0 (1.00s)
--- PASS: TestTcpListener/tcp://127.0.0.1:0 (1.00s)
--- PASS: TestTcpListener/tcp4://127.0.0.1:0 (1.00s)
=== RUN TestCounter
--- PASS: TestCounter (0.00s)
=== RUN TestGauge
--- PASS: TestGauge (0.00s)
=== RUN TestTimerHistogram
--- PASS: TestTimerHistogram (0.00s)
=== RUN TestTimerSummary
--- PASS: TestTimerSummary (0.00s)
=== RUN TestHistogramBucketValues
--- PASS: TestHistogramBucketValues (0.00s)
=== RUN TestOnRegisterError
--- PASS: TestOnRegisterError (0.00s)
=== RUN TestAlreadyRegisteredCounter
--- PASS: TestAlreadyRegisteredCounter (0.00s)
PASS
ok github.com/uber-go/tally/v4/prometheus (cached)
=== RUN TestCapabilities
--- PASS: TestCapabilities (0.00s)
PASS
ok github.com/uber-go/tally/v4/statsd (cached)
=== RUN TestTApplicationException
--- PASS: TestTApplicationException (0.00s)
=== RUN TestReadWriteBinaryProtocol
--- PASS: TestReadWriteBinaryProtocol (0.02s)
=== RUN TestBufferedTransport
--- PASS: TestBufferedTransport (0.00s)
=== RUN TestReadWriteCompactProtocol
--- PASS: TestReadWriteCompactProtocol (0.01s)
=== RUN TestPrependError
--- PASS: TestPrependError (0.00s)
=== RUN TestFramedTransport
--- PASS: TestFramedTransport (0.00s)
=== RUN TestHttpClient
--- PASS: TestHttpClient (0.00s)
=== RUN TestHttpClientHeaders
--- PASS: TestHttpClientHeaders (0.00s)
=== RUN TestHttpCustomClient
--- PASS: TestHttpCustomClient (0.00s)
=== RUN TestHttpCustomClientPackageScope
--- PASS: TestHttpCustomClientPackageScope (0.00s)
=== RUN TestStreamTransport
--- PASS: TestStreamTransport (0.00s)
=== RUN TestStreamTransportOpenClose
--- PASS: TestStreamTransportOpenClose (0.00s)
=== RUN TestWriteJSONProtocolBool
--- PASS: TestWriteJSONProtocolBool (0.00s)
=== RUN TestReadJSONProtocolBool
--- PASS: TestReadJSONProtocolBool (0.00s)
=== RUN TestWriteJSONProtocolByte
--- PASS: TestWriteJSONProtocolByte (0.00s)
=== RUN TestReadJSONProtocolByte
--- PASS: TestReadJSONProtocolByte (0.00s)
=== RUN TestWriteJSONProtocolI16
--- PASS: TestWriteJSONProtocolI16 (0.00s)
=== RUN TestReadJSONProtocolI16
--- PASS: TestReadJSONProtocolI16 (0.00s)
=== RUN TestWriteJSONProtocolI32
--- PASS: TestWriteJSONProtocolI32 (0.00s)
=== RUN TestReadJSONProtocolI32
--- PASS: TestReadJSONProtocolI32 (0.00s)
=== RUN TestWriteJSONProtocolI64
--- PASS: TestWriteJSONProtocolI64 (0.00s)
=== RUN TestReadJSONProtocolI64
--- PASS: TestReadJSONProtocolI64 (0.00s)
=== RUN TestWriteJSONProtocolDouble
--- PASS: TestWriteJSONProtocolDouble (0.00s)
=== RUN TestReadJSONProtocolDouble
--- PASS: TestReadJSONProtocolDouble (0.00s)
=== RUN TestWriteJSONProtocolString
--- PASS: TestWriteJSONProtocolString (0.00s)
=== RUN TestReadJSONProtocolString
--- PASS: TestReadJSONProtocolString (0.00s)
=== RUN TestWriteJSONProtocolBinary
--- PASS: TestWriteJSONProtocolBinary (0.00s)
=== RUN TestReadJSONProtocolBinary
--- PASS: TestReadJSONProtocolBinary (0.00s)
=== RUN TestWriteJSONProtocolList
--- PASS: TestWriteJSONProtocolList (0.00s)
=== RUN TestWriteJSONProtocolSet
--- PASS: TestWriteJSONProtocolSet (0.00s)
=== RUN TestWriteJSONProtocolMap
--- PASS: TestWriteJSONProtocolMap (0.00s)
=== RUN TestMemoryBuffer
--- PASS: TestMemoryBuffer (0.00s)
=== RUN TestEnsureTransportsAreRich
--- PASS: TestEnsureTransportsAreRich (0.00s)
=== RUN TestReadByte
--- PASS: TestReadByte (0.00s)
=== RUN TestSerializer
--- PASS: TestSerializer (0.00s)
=== RUN TestSocketIsntListeningAfterInterrupt
--- PASS: TestSocketIsntListeningAfterInterrupt (0.00s)
=== RUN TestNothing
--- PASS: TestNothing (0.00s)
=== RUN TestWriteSimpleJSONProtocolBool
--- PASS: TestWriteSimpleJSONProtocolBool (0.00s)
=== RUN TestReadSimpleJSONProtocolBool
--- PASS: TestReadSimpleJSONProtocolBool (0.00s)
=== RUN TestWriteSimpleJSONProtocolByte
--- PASS: TestWriteSimpleJSONProtocolByte (0.00s)
=== RUN TestReadSimpleJSONProtocolByte
--- PASS: TestReadSimpleJSONProtocolByte (0.00s)
=== RUN TestWriteSimpleJSONProtocolI16
--- PASS: TestWriteSimpleJSONProtocolI16 (0.00s)
=== RUN TestReadSimpleJSONProtocolI16
--- PASS: TestReadSimpleJSONProtocolI16 (0.00s)
=== RUN TestWriteSimpleJSONProtocolI32
--- PASS: TestWriteSimpleJSONProtocolI32 (0.00s)
=== RUN TestReadSimpleJSONProtocolI32
--- PASS: TestReadSimpleJSONProtocolI32 (0.00s)
=== RUN TestReadSimpleJSONProtocolI32Null
--- PASS: TestReadSimpleJSONProtocolI32Null (0.00s)
=== RUN TestWriteSimpleJSONProtocolI64
--- PASS: TestWriteSimpleJSONProtocolI64 (0.00s)
=== RUN TestReadSimpleJSONProtocolI64
--- PASS: TestReadSimpleJSONProtocolI64 (0.00s)
=== RUN TestReadSimpleJSONProtocolI64Null
--- PASS: TestReadSimpleJSONProtocolI64Null (0.00s)
=== RUN TestWriteSimpleJSONProtocolDouble
--- PASS: TestWriteSimpleJSONProtocolDouble (0.00s)
=== RUN TestReadSimpleJSONProtocolDouble
--- PASS: TestReadSimpleJSONProtocolDouble (0.00s)
=== RUN TestWriteSimpleJSONProtocolString
--- PASS: TestWriteSimpleJSONProtocolString (0.00s)
=== RUN TestReadSimpleJSONProtocolString
--- PASS: TestReadSimpleJSONProtocolString (0.00s)
=== RUN TestReadSimpleJSONProtocolStringNull
--- PASS: TestReadSimpleJSONProtocolStringNull (0.00s)
=== RUN TestWriteSimpleJSONProtocolBinary
--- PASS: TestWriteSimpleJSONProtocolBinary (0.00s)
=== RUN TestReadSimpleJSONProtocolBinary
--- PASS: TestReadSimpleJSONProtocolBinary (0.00s)
=== RUN TestReadSimpleJSONProtocolBinaryNull
--- PASS: TestReadSimpleJSONProtocolBinaryNull (0.00s)
=== RUN TestWriteSimpleJSONProtocolList
--- PASS: TestWriteSimpleJSONProtocolList (0.00s)
=== RUN TestWriteSimpleJSONProtocolSet
--- PASS: TestWriteSimpleJSONProtocolSet (0.00s)
=== RUN TestWriteSimpleJSONProtocolMap
--- PASS: TestWriteSimpleJSONProtocolMap (0.00s)
=== RUN TestTExceptionTimeout
--- PASS: TestTExceptionTimeout (0.00s)
=== RUN TestTExceptionEOF
--- PASS: TestTExceptionEOF (0.00s)
=== RUN TestZlibTransport
--- PASS: TestZlibTransport (0.01s)
PASS
ok github.com/uber-go/tally/v4/thirdparty/github.com/apache/thrift/lib/go/thrift (cached)

Process finished with exit code 0

`

@justinjc
Copy link
Collaborator

Thanks for the contribution! Would it be possible to also add the equivalent function for durations? Like a RecordValueWithWeight implementation?

@MGaulia
Copy link
Collaborator Author

MGaulia commented Mar 21, 2024

Of course, on it

@MGaulia
Copy link
Collaborator Author

MGaulia commented Mar 21, 2024

Ran tests again
go test PASS ok github.com/uber-go/tally/v4 5.238s

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.07%. Comparing base (0fbf11b) to head (bb4440b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   48.04%   48.07%   +0.03%     
==========================================
  Files          65       65              
  Lines        6061     6065       +4     
==========================================
+ Hits         2912     2916       +4     
  Misses       2709     2709              
  Partials      440      440              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinjc justinjc merged commit e2a71ea into uber-go:master Mar 21, 2024
7 checks passed
SokolAndrey added a commit to SokolAndrey/go-tally that referenced this pull request Mar 22, 2024
SokolAndrey added a commit that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants