[external system] make import performance trace thread safe IDEA-218935

PerformanceTrace can be updated after data node graph is already populated (e.g., to contain data service related information) and made available for serialization (on save event).

GitOrigin-RevId: fa670f37823f7a89c9a6cfc115c511a1a93bc56f
This commit is contained in:
Nikita Skvortsov
2019-07-29 15:53:00 +03:00
committed by intellij-monorepo-bot
parent 6da2a50844
commit 51ecc6e210
@@ -6,13 +6,13 @@ import com.intellij.openapi.externalSystem.util.ExternalSystemConstants;
import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;
public final class PerformanceTrace implements Serializable {
public static final Key<PerformanceTrace> TRACE_NODE_KEY = Key.create(PerformanceTrace.class, ExternalSystemConstants.UNORDERED + 1);
private final Map<String, Long> performanceData = new LinkedHashMap<>();
private final Map<String, Long> performanceData = new ConcurrentSkipListMap<>();
public void logPerformance(@NotNull String key, long millis) {
performanceData.put(key, millis);