Skip to content

Commit

Permalink
Merge pull request #187 from MyDogTom/mydogtom/fix-start-field
Browse files Browse the repository at this point in the history
Keep Double data type for "start" field
  • Loading branch information
cdsap authored May 29, 2020
2 parents c6a696f + 19e28d2 commit df81cd2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DefaultBuildMetricsProvider(
buildInvocationId?.let { map["buildInvocationId"] = it }
requestedTasks?.let { map["requestedTasks"] = it }
cacheRatio?.let { map["cacheRatio"] = it.toDouble() }
beginMs?.let { map["start"] = it.toLong() }
beginMs?.let { map["start"] = it.toDouble() }
rootProject?.let { map["rootProject"] = it }
scanLink?.let { map["scanLink"] = it }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ class DefaultBuildMetricsProviderTest : BehaviorSpec({

then("all values are registered") {
val expectedMap: Map<String, Any> = mapOf(
"start" to "1.590661991331E12".toDouble(),
"duration" to 10L,
"configuration" to 32L,
"success" to true,
"buildId" to "12",
"rootProject" to "app",
"requestedTasks" to "app:assembleDebug",
"scanLink" to "www.scan.link",
"buildInvocationId" to "123",
"osVersion" to "Linux 1.4",
"maxWorkers" to 2.toInt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ object ExecutionReportProvider {
}

fun completeExecutionReport() = ExecutionReport(
beginMs = "1.590661991331E12",
endMs = "1243",
durationMs = "10",
buildId = "12",
rootProject = "app",
requestedTasks = "app:assembleDebug",
scanLink = "www.scan.link",
buildInvocationId = "123",
configurationDurationMs = "32",
environment = Environment(
Expand Down Expand Up @@ -72,7 +77,6 @@ object ExecutionReportProvider {
taskProperties = getMetricsTasks(),
buildProperties = getMetricsBuild()
),

tasks = listOf(
TaskLength(
1, "clean", ":clean", TaskMessageState.EXECUTED, false,
Expand Down

0 comments on commit df81cd2

Please sign in to comment.