mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[telemetry] IJ-CR-140721 Naming
GitOrigin-RevId: e0b09a824c3a4264e44659d4e1d848e9d2c5bca9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
23d3717b6c
commit
e439da09f9
@@ -12,7 +12,7 @@ interface AsyncSpanExporter {
|
||||
|
||||
suspend fun flush() {}
|
||||
|
||||
/** Should clean any previously exported metrics */
|
||||
/** Should discard any previously exported metrics */
|
||||
suspend fun reset() {}
|
||||
|
||||
suspend fun shutdown() {}
|
||||
|
||||
@@ -92,11 +92,7 @@ interface TelemetryManager {
|
||||
@TestOnly
|
||||
suspend fun forceFlushMetrics()
|
||||
|
||||
/**
|
||||
* Blocking forceFlushMetrics function for test purposes.
|
||||
*
|
||||
* @see forceFlushMetrics
|
||||
*/
|
||||
/** Blocking [forceFlushMetrics] function for test purposes. */
|
||||
@Suppress("unused")
|
||||
@TestOnly
|
||||
fun forceFlushMetricsBlocking() {
|
||||
@@ -110,18 +106,11 @@ interface TelemetryManager {
|
||||
@TestOnly
|
||||
suspend fun resetExporters()
|
||||
|
||||
/**
|
||||
* Discard previously collected metrics and invoke flush.
|
||||
* @see resetExporters
|
||||
* @see forceFlushMetrics
|
||||
*/
|
||||
/** Blocking [resetExporters] counterpart for test purposes and for simplicity of use from Java. */
|
||||
@Suppress("unused")
|
||||
@TestOnly
|
||||
fun reset() {
|
||||
runBlocking {
|
||||
resetExporters()
|
||||
forceFlushMetrics()
|
||||
}
|
||||
fun resetExportersBlocking() {
|
||||
runBlocking { resetExporters() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public class BenchmarkTestInfoImpl implements BenchmarkTestInfo {
|
||||
private static void cleanupOutdatedMetrics() {
|
||||
try {
|
||||
// force spans and meters to be exported and discarded to minimize interference of the same metric on different tests
|
||||
TelemetryManager.getInstance().reset();
|
||||
TelemetryManager.getInstance().resetExportersBlocking();
|
||||
|
||||
// remove content of the previous tests from the idea.log
|
||||
IJPerfMetricsPublisher.Companion.truncateTestLog();
|
||||
|
||||
Reference in New Issue
Block a user