Skip to content

Conversation

magicxyyz
Copy link
Contributor

@magicxyyz magicxyyz commented Sep 24, 2025

Resolves NIT-3867

Adds arb/txstreamer/message/duration that measures complete processing time of a message (including both execution and writing to database).

@magicxyyz magicxyyz marked this pull request as ready for review October 7, 2025 18:17
@magicxyyz magicxyyz changed the title add txstreamer message timer metric add tx streamer message timer metric Oct 7, 2025
@magicxyyz magicxyyz changed the title add tx streamer message timer metric add tx streamer message processing duration metric Oct 7, 2025
Copy link

github-actions bot commented Oct 7, 2025

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
2145 4 2141 0
View the top 3 failed tests by shortest run time
TestDataStreaming_PositiveScenario/Many_senders,_long_messages
Stack Traces | 0.270s run time
=== RUN   TestDataStreaming_PositiveScenario/Many_senders,_long_messages
WARN [10-17|21:06:41.027] Served datastreaming_start               conn=127.0.0.1:55168 reqid=4 duration=38.432544ms err="too much time has elapsed since request was signed"
INFO [10-17|21:06:41.027] rpc response                             method=datastreaming_start logId=4 err="too much time has elapsed since request was signed" result={} attempt=0 args="[\"0x68f2afe0\", \"0x3a\", \"0xd9\", \"0x3064\", \"0xa\", \"0xb3f733b2280fa42fdefe5da4a5dc44306f1aa0a95fbc5c42d4933de2797fe44c6742a68b32d1576db00cb90afb06bd3ba7a5c9165e3b3c76d793f4dab4fb96aa01\"]" errorData=null
WARN [10-17|21:06:41.128] Served datastreaming_start               conn=127.0.0.1:58256 reqid=442 duration="178.072µs" err="too much time has elapsed since request was signed"
INFO [10-17|21:06:41.130] rpc response                             method=datastreaming_start logId=442 err="too much time has elapsed since request was signed" result={} attempt=0 args="[\"0x68f2afe0\", \"0x3a\", \"0xd9\", \"0x3064\", \"0xa\", \"0xb3f733b2280fa42fdefe5da4a5dc44306f1aa0a95fbc5c42d4933de2797fe44c6742a68b32d1576db00cb90afb06bd3ba7a5c9165e3b3c76d793f4dab4fb96aa01\"]" errorData=null
WARN [10-17|21:06:41.231] Served datastreaming_start               conn=127.0.0.1:58256 reqid=443 duration="150µs" err="too much time has elapsed since request was signed"
INFO [10-17|21:06:41.231] rpc response                             method=datastreaming_start logId=443 err="too much time has elapsed since request was signed" result={} attempt=0 args="[\"0x68f2afe0\", \"0x3a\", \"0xd9\", \"0x3064\", \"0xa\", \"0xb3f733b2280fa42fdefe5da4a5dc44306f1aa0a95fbc5c42d4933de2797fe44c6742a68b32d1576db00cb90afb06bd3ba7a5c9165e3b3c76d793f4dab4fb96aa01\"]" errorData=null
    protocol_test.go:248: goroutine 190 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.3/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x1567e90, 0xc000157c00}, {0x154d960, 0xc00231c2a0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic.func1()
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:248 +0x14f
        created by github.com/offchainlabs/nitro/daprovider/data_streaming.testBasic in goroutine 179
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:241 +0x85
        
    protocol_test.go:248: �[31;1m [] failed after 3 attempts: too much time has elapsed since request was signed �[0;0m
--- FAIL: TestDataStreaming_PositiveScenario/Many_senders,_long_messages (0.27s)
TestDataStreaming_PositiveScenario
Stack Traces | 0.300s run time
=== RUN   TestDataStreaming_PositiveScenario
--- FAIL: TestDataStreaming_PositiveScenario (0.30s)
TestValidationInputsAtWithWasmTarget
Stack Traces | 2.660s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
=== CONT  TestValidationInputsAtWithWasmTarget
    validation_inputs_at_test.go:70: goroutine 1490921 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.3/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x4084f90, 0xc085647c00}, {0x4042d40, 0xc0867c04c0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc085647c00, {0x4042d40, 0xc0867c04c0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1723 +0x5d
        github.com/offchainlabs/nitro/system_tests.TestValidationInputsAtWithWasmTarget(0xc085647c00)
        	/home/runner/work/nitro/nitro/system_tests/validation_inputs_at_test.go:70 +0x970
        testing.tRunner(0xc085647c00, 0x3ccd160)
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1997 +0x465
        
    validation_inputs_at_test.go:70: �[31;1m [] failed calculating position for validation: batch not found on L1 yet �[0;0m
�[90mreceipt object- [{"blockHash":"0x5415e11d518cc49ac45478b709f4696bc4554bf739836d78830716548af577a1","blockNumber":"0x2","contractAddress":null,"cumulativeGasUsed":"0x0","effectiveGasPrice":"0x5f5e100","from":"0x00000000000000000000000000000000000a4b05","gasUsed":"0x0","gasUsedForL1":"0x0","l1BlockNumber":"0x0","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","timeboosted":false,"to":"0x00000000000000000000000000000000000a4b05","transactionHash":"0x87c29849b014d43cd51218f5d335367b988513977303b3356f82a36ad1e024a2","transactionIndex":"0x0","type":"0x6a"},{"blockHash":"0x5415e11d518cc49ac45478b709f4696bc4554bf739836d78830716548af577a1","blockNumber":"0x2","contractAddress":null,"cumulativeGasUsed":"0xf9448","effectiveGasPrice":"0x5f5e100","from":"0x26e554a8acf9003b83495c7f45f06edcb803d4e3","gasUsed":"0xf9448","gasUsedForL1":"0xf4240","l1BlockNumber":"0x0","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","multiGasUsed":{"unknown":"0x0","computation":"0x5208","historyGrowth":"0x0","storageAccess":"0x0","storageGrowth":"0x0","l1Calldata":"0xf4240","l2Calldata":"0x0","wasmComputation":"0x0","refund":"0x0","total":"0xf9448"},"status":"0x1","timeboosted":true,"to":"0x8f34c8862920797d81916d62c274dd9217114f39","transactionHash":"0xeb2095cc07dbd5ecb96412b21ee43d3008f55df432268cda5d0adfb782954a81","transactionIndex":"0x1","type":"0x2"}]�[0;0m
�[90mstorage: len 5.46K vs 13.85K�[0;0m
�[90mstorage: deployed to 0x3a0a61C11D96F5B8c1492bEaA5bDAedefFff15E8�[0;0m
--- FAIL: TestValidationInputsAtWithWasmTarget (2.66s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

pmikolajczyk41
pmikolajczyk41 previously approved these changes Oct 8, 2025
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 left a comment

Choose a reason for hiding this comment

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

while I lack knowledge if that's the place such measurement should be taken, I could at least ensure that we follow here the same pattern of registering and using histogram metric as in the other parts of code 🙃

MishkaRogachev
MishkaRogachev previously approved these changes Oct 8, 2025
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.

3 participants