public CallItem(FunctionCall call, NodeModel node, bool perCall) { Call = call; Node = node; Text = node.AppendClassName(); if (call == null) { return; } if (call.StillInside > 0) { Text += " (" + call.StillInside.ToString() + " Still Inside)"; } SubItems.Add(call.TotalHits.ToString()); Hits = call.TotalHits; Inside = call.TotalTimeInsideDest; Outside = call.TotalTimeOutsideDest; if (Hits == 0) { return; } if (perCall) { Inside /= Hits; Outside /= Hits; } SubItems.Add(Utilities.TicksToString(Inside)); SubItems.Add(Utilities.TicksToString(Outside)); Total = Inside + Outside; }
public CallItem(FunctionCall call, NodeModel node, bool perCall) { Call = call; Node = node; Text = node.AppendClassName(); if (call == null) { return; } if (call.StillInside > 0) { Text += " (" + call.StillInside.ToString() + " Still Inside)"; } SubItems.Add(call.TotalHits.ToString()); Hits = call.TotalHits; Inside = call.TotalTimeInsideDest; Outside = call.TotalTimeOutsideDest; if (Hits == 0) { return; } if (perCall) { Inside /= Hits; Outside /= Hits; } SubItems.Add(Utilities.TicksToString(Inside)); SubItems.Add(Utilities.TicksToString(Outside)); Total = Inside + Outside; // show last cal info string callInfo = ""; try { var lastParams = call.LastParameters; if (lastParams != null) { callInfo += "Params: " + string.Join(", ", lastParams.Select(p => (p == null) ? "<null>" : p.ToString()).ToArray()); } } catch (Exception x) { throw new Exception("AAA"); } object lastReturnValue = null; try { lastReturnValue = call.LastReturnValue; // avoid thread from changing value out from under us } catch (Exception x) { throw new Exception("b1" + x.Message); } try { if (lastReturnValue != null) { callInfo += " Return: "; } } catch (Exception x) { throw new Exception("b2" + x.Message); } try { if (lastReturnValue != null) { callInfo += lastReturnValue.ToString(); } } catch (Exception x) { throw new Exception("b3" + x.Message); } SubItems.Add(callInfo); }
public CallItem(FunctionCall call, NodeModel node, bool perCall) { Call = call; Node = node; Text = node.AppendClassName(); if (call == null) return; if (call.StillInside > 0 ) Text += " (" + call.StillInside.ToString() + " Still Inside)"; SubItems.Add(call.TotalHits.ToString()); Hits = call.TotalHits; Inside = call.TotalTimeInsideDest; Outside = call.TotalTimeOutsideDest; if (Hits == 0) return; if (perCall) { Inside /= Hits; Outside /= Hits; } SubItems.Add(Utilities.TicksToString(Inside)); SubItems.Add(Utilities.TicksToString(Outside)); Total = Inside + Outside; // show last cal info string callInfo = ""; try { var lastParams = call.LastParameters; if (lastParams != null) callInfo += "Params: " + string.Join(", ", lastParams.Select(p => (p == null) ? "<null>" : p.ToString()).ToArray()); } catch (Exception x) { throw new Exception("AAA"); } object lastReturnValue = null; try { lastReturnValue = call.LastReturnValue; // avoid thread from changing value out from under us } catch (Exception x) { throw new Exception("b1" + x.Message); } try { if (lastReturnValue != null) callInfo += " Return: "; } catch (Exception x) { throw new Exception("b2" + x.Message); } try { if (lastReturnValue != null) callInfo += lastReturnValue.ToString(); } catch (Exception x) { throw new Exception("b3" + x.Message); } SubItems.Add(callInfo); }
public CallItem(FunctionCall call, NodeModel node, bool perCall) { Call = call; Node = node; Text = node.AppendClassName(); if (call == null) return; if (call.StillInside > 0 ) Text += " (" + call.StillInside.ToString() + " Still Inside)"; SubItems.Add(call.TotalHits.ToString()); Hits = call.TotalHits; Inside = call.TotalTimeInsideDest; Outside = call.TotalTimeOutsideDest; if (Hits == 0) return; if (perCall) { Inside /= Hits; Outside /= Hits; } SubItems.Add(Utilities.TicksToString(Inside)); SubItems.Add(Utilities.TicksToString(Outside)); Total = Inside + Outside; }