long (long start, @NotNull Class<?> clazz, @NotNull ActivityCategory category, @Nullable String pluginId, long threshold) { if (!isEnabled) { return -1; } long end = System.nanoTime(); long duration = end - start; if (duration <= threshold) { return duration; } addCompletedActivity(start, end, clazz.getName(), category, pluginId); return duration; }