From b30b3c39d74cd2d6bb1c98ec4c3934be72a9b099 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Tue, 20 Oct 2015 19:25:28 +0300 Subject: [PATCH] Fix graph drawing for multiprocess programs (PY-17268) --- .../python/debugger/PyConcurrencyEvent.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/python/pydevSrc/com/jetbrains/python/debugger/PyConcurrencyEvent.java b/python/pydevSrc/com/jetbrains/python/debugger/PyConcurrencyEvent.java index 0110039c2cb0..ebefa9024127 100644 --- a/python/pydevSrc/com/jetbrains/python/debugger/PyConcurrencyEvent.java +++ b/python/pydevSrc/com/jetbrains/python/debugger/PyConcurrencyEvent.java @@ -23,12 +23,13 @@ import java.util.List; public abstract class PyConcurrencyEvent { protected final @NotNull String myThreadId; + protected final @NotNull String myPid; protected final @NotNull String myName; protected @NotNull EventType myType; protected @NotNull String myFileName; protected @NotNull Integer myLine; protected final boolean myIsAsyncio; - protected final long myTime; + protected long myTime; // microseconds protected @NotNull List myFrames; public enum EventType { @@ -38,6 +39,7 @@ public abstract class PyConcurrencyEvent { public PyConcurrencyEvent(long time, @NotNull String threadId, @NotNull String name, boolean isAsyncio) { myTime = time; myThreadId = threadId; + myPid = threadId.split("_")[0]; myName = name; myIsAsyncio = isAsyncio; myType = EventType.CREATE; @@ -87,11 +89,20 @@ public abstract class PyConcurrencyEvent { return myTime; } + public void setTime(long time) { + myTime = time; + } + @NotNull public Integer getLine() { return myLine; } + @NotNull + public String getPid() { + return myPid; + } + @NotNull public List getFrames() { return myFrames;