From 47ed4aee6217828d4693924f47dc70faf07cd5f1 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 12 Jul 2021 12:47:28 +0200 Subject: [PATCH 1/2] Update CostReport.kt --- test_runner/src/main/kotlin/ftl/reports/CostReport.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/reports/CostReport.kt b/test_runner/src/main/kotlin/ftl/reports/CostReport.kt index 205b8c43a0..999c8a8349 100644 --- a/test_runner/src/main/kotlin/ftl/reports/CostReport.kt +++ b/test_runner/src/main/kotlin/ftl/reports/CostReport.kt @@ -28,13 +28,16 @@ object CostReport : IReport { totalBillablePhysicalMinutes += it.billableMinutes.physical } + val virtualCost = calculateVirtualCost(totalBillableVirtualMinutes.toBigDecimal()) + val physicalCost = calculatePhysicalCost(totalBillablePhysicalMinutes.toBigDecimal()) + args.sendConfiguration( events = mapOf( - "virtual_cost" to calculateVirtualCost(totalBillableVirtualMinutes.toBigDecimal()), - "physical_cost" to calculatePhysicalCost(totalBillablePhysicalMinutes.toBigDecimal()), + "virtual_cost" to virtualCost, + "physical_cost" to physicalCost, "total_cost" to calculateTotalCost( - totalBillablePhysicalMinutes.toBigDecimal(), - totalBillableVirtualMinutes.toBigDecimal() + virtualCost, + physicalCost ) ), eventName = "devices_cost" From ab069f250116e978896b67193289cd4f78d29070 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 12 Jul 2021 13:01:16 +0200 Subject: [PATCH 2/2] Update CostReport.kt --- test_runner/src/main/kotlin/ftl/reports/CostReport.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_runner/src/main/kotlin/ftl/reports/CostReport.kt b/test_runner/src/main/kotlin/ftl/reports/CostReport.kt index 999c8a8349..3bf86c2c83 100644 --- a/test_runner/src/main/kotlin/ftl/reports/CostReport.kt +++ b/test_runner/src/main/kotlin/ftl/reports/CostReport.kt @@ -35,7 +35,7 @@ object CostReport : IReport { events = mapOf( "virtual_cost" to virtualCost, "physical_cost" to physicalCost, - "total_cost" to calculateTotalCost( + "cost_total" to calculateTotalCost( virtualCost, physicalCost )