Skip to content

Commit

Permalink
Run both TC01 and TC02
Browse files Browse the repository at this point in the history
  • Loading branch information
akgagnat committed Sep 16, 2024
1 parent e58cd19 commit e553b0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private val logger = LoggerFactory.getLogger("no.nav.soknad.arkivering.Main")

val testCases: Map<TestCase, KFunction1<LoadTests, Result<Unit>>> = mapOf(
TestCase.TC01 to LoadTests::`TC01 - Innsending av 10 soknader, hver med to vedlegg pa 2MB`,
// TestCase.TC02 to LoadTests::`TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 1MB`,
TestCase.TC02 to LoadTests::`TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 1MB`,
// TestCase.TC03 to ("Innsending av 1000 søknader, hver med to vedlegg på 1MB"),
// TestCase.TC04 to ("Innsending av 5 søknader, hver med fire vedlegg på 38MB"),
)
Expand All @@ -35,7 +35,7 @@ fun main() {
val timer = metrics.testCaseDuration.labels(testCaseId).startTimer()
testCaseFunction.value.invoke(loadTests)
.onSuccess {
val elapsed = timer.observeDuration()
val elapsed = timer.setDuration()
logger.info("Test case $testCaseId completed successfully in $elapsed seconds")
}
.onFailure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package no.nav.soknad.arkivering

import io.prometheus.client.CollectorRegistry
import io.prometheus.client.Gauge
import io.prometheus.client.Histogram
import io.prometheus.client.exporter.PushGateway


Expand All @@ -26,10 +25,9 @@ class Metrics(
.help("Last time loadtests failed, in unixtime.")
.register(registry)

var testCaseDuration: Histogram = Histogram.build()
.name("innsendingloadtests_xtestcase_duration_seconds") // TODO remove x prefix, used during initial testing of metrics
val testCaseDuration: Gauge = Gauge.build()
.name("innsendingloadtests_ytestcase_duration_seconds") // TODO remove y prefix, used during initial testing of metrics
.help("Duration of test case in seconds.")
.exponentialBuckets(10.0, 2.0, 10)
.labelNames("testcase_id")
.register(registry)

Expand Down

0 comments on commit e553b0c

Please sign in to comment.