diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2020-04-10 23:21:21 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2020-04-10 23:21:21 +0200 |
| commit | 5310dd64606f398bddcaef87f26eee94b663b39d (patch) | |
| tree | 8cb4c2a4643962d43b83bb8804f84611d5196d18 /opendc/opendc-format | |
| parent | ebcda5df6a858256d2022f091d10da4083b00258 (diff) | |
| parent | ead9f9680792878f51be58d931c6337edeefae4b (diff) | |
Merge branch 'bug/virt-driver-interference' into '2.x'
Fix incorrect reporting of overcommission
See merge request opendc/opendc-simulator!53
Diffstat (limited to 'opendc/opendc-format')
2 files changed, 8 insertions, 6 deletions
diff --git a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt index 78a58671..e0d81b38 100644 --- a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt +++ b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/sc20/Sc20TraceReader.kt @@ -103,10 +103,10 @@ class Sc20TraceReader( val flops: Long = (cpuUsage * 5 * 60 * cores).toLong() if (flopsHistory.isEmpty()) { - flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage)) + flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores)) } else { if (flopsHistory.last().flops != flops) { - flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage)) + flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores)) } else { val oldFragment = flopsHistory.removeAt(flopsHistory.size - 1) flopsHistory.add( @@ -114,7 +114,8 @@ class Sc20TraceReader( oldFragment.tick, oldFragment.flops + flops, oldFragment.duration + traceInterval, - cpuUsage + cpuUsage, + cores ) ) } diff --git a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/vm/VmTraceReader.kt b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/vm/VmTraceReader.kt index 6b8843aa..fbe77654 100644 --- a/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/vm/VmTraceReader.kt +++ b/opendc/opendc-format/src/main/kotlin/com/atlarge/opendc/format/trace/vm/VmTraceReader.kt @@ -101,10 +101,10 @@ class VmTraceReader( val flops: Long = (cpuUsage * 5 * 60 * cores).toLong() if (flopsHistory.isEmpty()) { - flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage)) + flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores)) } else { if (flopsHistory.last().flops != flops) { - flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage)) + flopsHistory.add(FlopsHistoryFragment(timestamp, flops, traceInterval, cpuUsage, cores)) } else { val oldFragment = flopsHistory.removeAt(flopsHistory.size - 1) flopsHistory.add( @@ -112,7 +112,8 @@ class VmTraceReader( oldFragment.tick, oldFragment.flops + flops, oldFragment.duration + traceInterval, - cpuUsage + cpuUsage, + cores ) ) } |
