Skip to content

Commit

Permalink
logic bug with tag filtering on metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jillesvangurp committed Nov 18, 2023
1 parent 06afd28 commit 7f88600
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/jsMain/kotlin/metrics/metrics.kt
Original file line number Diff line number Diff line change
@@ -52,14 +52,17 @@ class MetricsOutputStore() : RootStore<List<MetricsOutput>?>(null, Job()) {
console.log("Using ${pluginFactory::class.simpleName}")
}
val tags = testCaseSearchFilterStore.current?.tags.orEmpty()
console.log(tags)
pluginFactory?.let { pf ->
val plugin = pf.create(config)
console.info("measuring")
plugin.runMetrics(config, ratedSearches.filter { rs ->
if (tags.isEmpty()) {
console.log("no tags")
true
} else {
tags.containsAll(rs.tags.orEmpty())
console.log(rs.id,rs.tags, rs.tags.orEmpty().containsAll(tags))
rs.tags.orEmpty().containsAll(tags)
}
})
}

0 comments on commit 7f88600

Please sign in to comment.