File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ abstract class DockerProxy(configuration: Configuration) : MigrationStrategy(con
9393 private fun listenForDockerStatistics () {
9494 println (" Started a docker stats process" )
9595 val numberOfElements = (configuration.slotDuration / 1000 ).toInt()
96-
96+ val json = Json { ignoreUnknownKeys = true }
9797 while (true ) {
9898 // TODO: I believe this could be optimised
9999 val process = ProcessBuilder ()
@@ -103,7 +103,7 @@ abstract class DockerProxy(configuration: Configuration) : MigrationStrategy(con
103103 val reader = process.inputStream.bufferedReader()
104104
105105 reader.readLines().forEach { line ->
106- val stats = Json .decodeFromString<DockerStatsModel >(line)
106+ val stats = json .decodeFromString<DockerStatsModel >(line)
107107 val pids = stats.pids.toIntOrNull() ? : 0
108108 val cpuPercentage = stats.cpuPercentage.trim(' %' ).toDoubleOrNull() ? : 0.0
109109 val memoryPercentage = stats.memoryPercentage.trim(' %' ).toDoubleOrNull() ? : 0.0
You can’t perform that action at this time.
0 commit comments