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

Fixed a bug where fragments were being loaded in reversed order. #276

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading