Skip to content

Conversation

@sgdxbc
Copy link
Contributor

@sgdxbc sgdxbc commented Jan 15, 2025

The log format is updated with nanosecond-scale resolution. Sample:

[FINER  ] [2025-01-15 13:30:54.139487329] [dslabs.framework.Node] MessageReceive(client1 -> pingserver, PingRequest(ping=PingApplication.Ping(value=Hello, World!)))
[FINER  ] [2025-01-15 13:30:54.142355292] [dslabs.framework.Node] TimerReceive(-> client1, PingTimer(ping=PingApplication.Ping(value=Hello, World!)))
[FINER  ] [2025-01-15 13:30:54.150642300] [dslabs.framework.Node] MessageReceive(client1 -> pingserver, PingRequest(ping=PingApplication.Ping(value=Hello, World!)))
[FINER  ] [2025-01-15 13:30:54.151288087] [dslabs.framework.Node] MessageReceive(pingserver -> client1, PongReply(pong=PingApplication.Pong(value=Hello, World!)))
[FINER  ] [2025-01-15 13:30:54.153208765] [dslabs.framework.Node] MessageReceive(pingserver -> client1, PongReply(pong=PingApplication.Pong(value=Hello, World!)))

The failure message for maximum waiting time exceeded, while already in nanosecond-scale resolution, has been updated to keep consistency. Sample:

java.lang.AssertionError: client3 waited too long, 8576 ms (3000 ms allowed), started waiting at 2025-01-15 13:27:20.554216249

The previously second-scale resolution in log message is not enough for identifying livelock-related bugs, because the timeouts are in millisecond scale.

Besides, I am planning to make a message diagram style log visualizer for run tests, which can benefit from finer-grained time in the logs.

(The original idea is to update with microsecond-scale resolution, but apparently there's no format conversion for that according to Formatter.)

@emichael emichael merged commit 687ecc4 into emichael:master Jan 21, 2025
5 checks passed
@emichael
Copy link
Owner

Much better, thanks! I'm slightly inclined to cut this off a microseconds as nanos is never really useful, but this is certainly better than only having seconds.

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.

2 participants