IJPL-797 intellij.platform.diagnostic: dump API

GitOrigin-RevId: d7a33c8d173891cfcb7a9a9f449dfb73dbf369e2
This commit is contained in:
Daniil Ovchinnikov
2024-03-26 19:53:07 +01:00
committed by intellij-monorepo-bot
parent b213079f42
commit 2f98c30dc8
6 changed files with 13 additions and 2 deletions

View File

View File

@@ -1,9 +1,11 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.diagnostic;
import org.jetbrains.annotations.ApiStatus.Internal;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@Internal
public interface Activity {
@NotNull String getName();

View File

@@ -1,8 +1,10 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.diagnostic;
import org.jetbrains.annotations.ApiStatus.Internal;
import org.jetbrains.annotations.NotNull;
@Internal
// non-sequential and repeated items
public enum ActivityCategory {
DEFAULT("item"),

View File

@@ -1,10 +1,13 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.platform.diagnostic.telemetry
import org.jetbrains.annotations.ApiStatus.Internal
/**
* @param verbose provides a way to disable by default some tracers.
* Such tracers will be created only if additional system property "verbose" is set to true.
*/
@Internal
data class Scope @JvmOverloads constructor(val name: String, val parent: Scope? = null, val verbose: Boolean = false) {
override fun toString(): String = if (parent == null) name else "$parent.$name"
}

View File

@@ -13,6 +13,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.LongBinaryOperator;
@ApiStatus.Internal
public final class StartUpMeasurer {
public static final long MEASURE_THRESHOLD = TimeUnit.MILLISECONDS.toNanos(10);
@@ -65,6 +66,7 @@ public final class StartUpMeasurer {
@ApiStatus.Internal
public static final Map<String, Object2LongOpenHashMap<String>> pluginCostMap = new ConcurrentHashMap<>();
@ApiStatus.Internal
public static long getCurrentTime() {
return System.nanoTime();
}

View File

@@ -1,8 +1,10 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.diagnostic;
import org.jetbrains.annotations.ApiStatus.Internal;
import org.jetbrains.annotations.NotNull;
@Internal
public interface ThreadNameManager {
String getThreadName(@NotNull ActivityImpl event);
}