Skip to content

Commit

Permalink
Fixed a bug where fragments were being loaded in reversed order. (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanteNiewenhuis authored Nov 29, 2024
1 parent 9e99bf2 commit 124b40c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ class ScenarioIntegrationTest {

// Note that these values have been verified beforehand
assertAll(
{ assertEquals(1803918473, monitor.idleTime) { "Idle time incorrect" } },
{ assertEquals(787181527, monitor.activeTime) { "Active time incorrect" } },
{ assertEquals(1803918431, monitor.idleTime) { "Idle time incorrect" } },
{ assertEquals(787181569, monitor.activeTime) { "Active time incorrect" } },
{ assertEquals(0, monitor.stealTime) { "Steal time incorrect" } },
{ assertEquals(0, monitor.lostTime) { "Lost time incorrect" } },
{ assertEquals(6.7565629E8, monitor.energyUsage, 1E4) { "Incorrect energy usage" } },
Expand Down Expand Up @@ -341,8 +341,8 @@ class ScenarioIntegrationTest {
{ assertEquals(0, monitor.tasksActive, "All VMs should finish after a run") },
{ assertEquals(0, monitor.attemptsFailure, "No VM should be unscheduled") },
{ assertEquals(0, monitor.tasksPending, "No VM should not be in the queue") },
{ assertEquals(43101787433, monitor.idleTime) { "Incorrect idle time" } },
{ assertEquals(3489412567, monitor.activeTime) { "Incorrect active time" } },
{ assertEquals(43101787498, monitor.idleTime) { "Incorrect idle time" } },
{ assertEquals(3489412502, monitor.activeTime) { "Incorrect active time" } },
{ assertEquals(0, monitor.stealTime) { "Incorrect steal time" } },
{ assertEquals(0, monitor.lostTime) { "Incorrect lost time" } },
{ assertEquals(1.0016123392181786E10, monitor.energyUsage, 1E4) { "Incorrect energy usage" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private Builder(long checkpointInterval, long checkpointDuration, double checkpo
* @param cores The number of cores used during this fragment.
*/
public void add(long duration, double usage, int cores) {
fragments.add(0, new TraceFragment(duration, usage, cores));
fragments.add(fragments.size(), new TraceFragment(duration, usage, cores));
}

/**
Expand Down

0 comments on commit 124b40c

Please sign in to comment.