From fc111e8d5fe8cc73d035b2ce11620a930dd5211a Mon Sep 17 00:00:00 2001 From: Maciej Kwidzinski Date: Mon, 11 Dec 2023 12:42:36 +0100 Subject: [PATCH] Expose `RawCohortResult.cohort` --- CHANGELOG.md | 3 +++ .../tools/report/api/result/RawCohortResult.kt | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05543d1..2f3c689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ Dropping a requirement of a major version of a dependency is a new contract. ## [Unreleased] [Unreleased]: https://github.com/atlassian/report/compare/release-4.1.0...master +### Added +- Expose `RawCohortResult.cohort`. + ## [4.1.0] - 2023-11-30 [4.1.0]: https://github.com/atlassian/report/compare/release-4.0.0...release-4.1.0 diff --git a/src/main/kotlin/com/atlassian/performance/tools/report/api/result/RawCohortResult.kt b/src/main/kotlin/com/atlassian/performance/tools/report/api/result/RawCohortResult.kt index dcf1f3d..2e218b4 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/report/api/result/RawCohortResult.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/report/api/result/RawCohortResult.kt @@ -27,6 +27,11 @@ abstract class RawCohortResult private constructor() { */ abstract val failure: Exception? + /** + * Textual description of the cohort, e.g. "9.12.0 on DC 2 nodes - experiment, sample 3". + */ + abstract val cohort: String + /** * Prepares post-processed performance results. */ @@ -68,7 +73,7 @@ abstract class RawCohortResult private constructor() { } private class FullRawCohortResult( - private val cohort: String, + override val cohort: String, override val results: Path, format: MetricJsonFormat ) : RawCohortResult() { @@ -113,7 +118,7 @@ abstract class RawCohortResult private constructor() { } private class FailedRawCohortResult( - private val cohort: String, + override val cohort: String, override val results: Path, override val failure: Exception ) : RawCohortResult() { @@ -134,7 +139,7 @@ abstract class RawCohortResult private constructor() { } private class LegacyRawCohortResult( - private val cohort: String, + override val cohort: String, override val failure: Exception ) : RawCohortResult() {