From eca248797bd66924c626a8cf79c4e32981e5480a Mon Sep 17 00:00:00 2001 From: Tolya Korniltsev Date: Fri, 9 Feb 2024 15:10:43 +0700 Subject: [PATCH] feat: add ctimer event type (#145) --- agent/src/main/java/io/pyroscope/javaagent/EventType.java | 1 + demo/src/main/java/App.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/agent/src/main/java/io/pyroscope/javaagent/EventType.java b/agent/src/main/java/io/pyroscope/javaagent/EventType.java index c6d3988..84af01e 100644 --- a/agent/src/main/java/io/pyroscope/javaagent/EventType.java +++ b/agent/src/main/java/io/pyroscope/javaagent/EventType.java @@ -12,6 +12,7 @@ public enum EventType { ALLOC (Events.ALLOC, Units.OBJECTS, AggregationType.SUM), LOCK (Events.LOCK, Units.SAMPLES, AggregationType.SUM), WALL (Events.WALL, Units.SAMPLES, AggregationType.SUM), + CTIMER (Events.CTIMER, Units.SAMPLES, AggregationType.SUM), ITIMER (Events.ITIMER, Units.SAMPLES, AggregationType.SUM); /** diff --git a/demo/src/main/java/App.java b/demo/src/main/java/App.java index dbf1224..d4d6a83 100644 --- a/demo/src/main/java/App.java +++ b/demo/src/main/java/App.java @@ -1,4 +1,5 @@ import io.pyroscope.http.Format; +import io.pyroscope.javaagent.EventType; import io.pyroscope.javaagent.PyroscopeAgent; import io.pyroscope.javaagent.api.Logger; import io.pyroscope.javaagent.config.Config; @@ -20,6 +21,7 @@ public static void main(String[] args) { .setApplicationName("demo.app{qweqwe=asdasd}") .setServerAddress("http://localhost:4040") .setFormat(Format.JFR) + .setProfilingEvent(EventType.CTIMER) .setLogLevel(Logger.Level.DEBUG) .setLabels(mapOf("user", "tolyan")) .build())