The progress counts from PIT's real start (0.15.2) #28

Merged
mi merged 1 commits from mihoe/progress-nanotime into main 2026-10-03 14:11:37 +02:00
Owner

Related Links

  • PR#26, which introduced the progress lines

The Problem

The first real run with 0.15.0, werkcrappit measuring itself for 6 min 19 s, wrote no progress line, and its last line said 0:00:00.
PIT's ListenerArguments.getStartTime() is System.nanoTime(), not a wall-clock time; the listener compared it with System.currentTimeMillis().
The elapsed time came out negative, was clamped to 0, and never reached the minute that lets a line through.
The unit tests passed their own clock and start time on one scale, so they could not see it.

The Scenarios

  • @MC-032 and @MC-035 unchanged; now they hold in a real run.
Verified by
  • MutationCrapListenerTest progressCountsFromPitsNanoTimeStart: the listener's own clock against a start time 61 s back on the nanoTime scale.

The Solution

  • The listener's clock is milliseconds of System.nanoTime(), and PIT's start time is divided to milliseconds on the same scale.
  • Version 0.15.2.

🤖 Generated with Claude Code

## Related Links - [PR#26](2026-10-03-PR%2326-progress-in-the-log.md), which introduced the progress lines ## The Problem The first real run with 0.15.0, werkcrappit measuring itself for 6 min 19 s, wrote no progress line, and its last line said `0:00:00`. PIT's `ListenerArguments.getStartTime()` is `System.nanoTime()`, not a wall-clock time; the listener compared it with `System.currentTimeMillis()`. The elapsed time came out negative, was clamped to 0, and never reached the minute that lets a line through. The unit tests passed their own clock and start time on one scale, so they could not see it. ## The Scenarios - `@MC-032` and `@MC-035` unchanged; now they hold in a real run. ##### Verified by - [MutationCrapListenerTest](../../werkcrappit-pit/src/test/java/de/javagil/werkcrappit/pit/listener/MutationCrapListenerTest.java) `progressCountsFromPitsNanoTimeStart`: the listener's own clock against a start time 61 s back on the `nanoTime` scale. ## The Solution - The listener's clock is milliseconds of `System.nanoTime()`, and PIT's start time is divided to milliseconds on the same scale. - Version 0.15.2. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 1 commit 2026-10-03 12:39:45 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi merged commit 99f63876a3 into main 2026-10-03 14:11:37 +02:00
mi deleted branch mihoe/progress-nanotime 2026-10-03 14:11:37 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkcrappit#28