diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-05-19 12:26:28 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-05-20 16:02:42 +0200 |
| commit | 0df72a9032882abe132ab7683ff917f49a3c6645 (patch) | |
| tree | cf49a1a4232990931d0ed7e840dd7555a9890d68 | |
| parent | 50bf4b2c97dc1788035a05a8307d2c900796ecb3 (diff) | |
Fix timestamps
| -rw-r--r-- | opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt index 593ad8ba..07b200a6 100644 --- a/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt +++ b/opendc/opendc-experiments-sc20/src/main/kotlin/com/atlarge/opendc/experiments/sc20/trace/Sc20TraceConverter.kt @@ -176,7 +176,7 @@ fun readSolvinityTrace( val values = line.split(" ") vmId = vmFile.name - val timestamp = values[timestampCol].trim().toLong() * 1000L + val timestamp = (values[timestampCol].trim().toLong() - 5 * 60) * 1000L cores = values[coreCol].trim().toInt() requiredMemory = max(requiredMemory, values[provisionedMemoryCol].trim().toLong()) maxCores = max(maxCores, cores) @@ -332,7 +332,7 @@ fun readAzureTrace( continue } - timestamp = (values[timestampCol].trim().toLong() - 5 * 60) * 1000L + timestamp = values[timestampCol].trim().toLong() * 1000L vmIdToMetadata[vmId]!!.minTime = min(vmIdToMetadata[vmId]!!.minTime, timestamp) cpuUsage = values[cpuUsageCol].trim().toDouble() * 4_000 // MHz vmIdToMetadata[vmId]!!.maxTime = max(vmIdToMetadata[vmId]!!.maxTime, timestamp) |
