Changeset 291:be800419204e in finroc_tools_finstruct-java
- Timestamp:
- 13.12.2020 21:05:49 (3 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
propertyeditor/TaskProfileViewer.java
r274 r291 123 123 return; 124 124 } 125 126 // If handles are invalid (possibly a code section profile), display indices instead of framework element names 127 boolean displayIndices = false; 128 if (t.size() > 1) { 129 displayIndices = true; 130 for (int i = 1; i < Math.min(5, t.size()); i++) { 131 displayIndices &= t.get(i).handle == 0; 132 } 133 } 134 125 135 Object[][] data = new Object[t.size()][]; 126 136 for (int i = 0; i < t.size(); i++) { … … 131 141 data[i][0] = name; 132 142 if (i > 0) { 133 RemoteFrameworkElement element = runtime.getRemoteElement(taskProfile.handle); 134 if (element.isInterface()) { 135 element = (RemoteFrameworkElement)element.getParent(); 143 if (displayIndices) { 144 name.string = i + " (~" + Math.round(taskProfile.totalExecutionDuration.getNumericRepresentation().doubleValue() / taskProfile.averageExecutionDuration.getNumericRepresentation().doubleValue()) + " executions)"; 145 } else { 146 RemoteFrameworkElement element = runtime.getRemoteElement(taskProfile.handle); 147 if (element.isInterface()) { 148 element = (RemoteFrameworkElement)element.getParent(); 149 } 150 name.string = element == null ? "Unknown" : element.getQualifiedLink(); 136 151 } 137 name.string = element == null ? "Unknown" : element.getQualifiedLink();138 152 } 139 153 data[i][1] = new ColoredString(taskProfile.lastExecutionDuration.toString(), color);
Note: See TracChangeset
for help on using the changeset viewer.