[Desc.] 1. thread API : ordering, column size change 2. ui function profiling, function usage profiling : elapsed time format change
[Issue]
if (0 == input.getExclusiveElapsedTime()) {
exeTime = CommonConstants.DASH;
} else {
- exeTime = Formatter.toTimeFormat(input
+ exeTime = Formatter.toTimeFormat4(input
.getExclusiveElapsedTime());
}
if (0 == input.getElapsedTime()) {
inExeTime = CommonConstants.DASH;
} else {
- inExeTime = Formatter.toTimeFormat(input.getElapsedTime());
+ inExeTime = Formatter.toTimeFormat4(input.getElapsedTime());
}
} catch (NumberFormatException e) {
// FIXME
contentText.add(Integer.toString(contentTemp.getPid()));
contentData.add(Integer.toString(contentTemp.getPid()));
+ contentText.add(Long.toString(contentTemp.getTid()));
+ contentData.add(Long.toString(contentTemp.getTid()));
+
contentText.add(contentTemp.getApiName());
contentData.add(contentTemp.getApiName());
contentText.add(contentTemp.getArgs());
contentData.add(contentTemp.getArgs());
- contentText.add(Long.toString(contentTemp.getTid()));
- contentData.add(Long.toString(contentTemp.getTid()));
-
contentText.add(contentTemp.getHexReturn());
contentData.add(Long.toString(contentTemp.getReturn()));
ThreadPageLabels.THREAD_API_LIST_VIEW_INDEX,
ThreadPageLabels.THREAD_API_LIST_VIEW_TIME,
ThreadPageLabels.THREAD_API_LIST_VIEW_PID,
+ ThreadPageLabels.THREAD_API_LIST_VIEW_THREAD_ID,
ThreadPageLabels.THREAD_API_LIST_VIEW_NAME,
ThreadPageLabels.THREAD_API_LIST_VIEW_PARAMETER,
- ThreadPageLabels.THREAD_API_LIST_VIEW_THREAD_ID,
- ThreadPageLabels.THREAD_API_LIST_VIEW_RETURN,
+ ThreadPageLabels.THREAD_API_LIST_VIEW_RETURN,
ThreadPageLabels.THREAD_API_LIST_VIEW_ERRNO };
- private int[] columnSizes = { 35, 70,70, 120, 250, 70, 100, 100 };
+ private int[] columnSizes = { 35, 70, 45, 45, 180, 240, 75, 100 };
private int[] columnAlignment = { SWT.RIGHT, SWT.LEFT,SWT.LEFT, SWT.LEFT, SWT.LEFT,
SWT.LEFT, SWT.LEFT, SWT.LEFT };
int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM,
- AnalyzerConstants.SORT_TYPE_STRING,
- AnalyzerConstants.SORT_TYPE_STRING,
AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
AnalyzerConstants.SORT_TYPE_STRING };
// int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX,
inAvgTime = getAvgTime(Integer.parseInt(inTime),
input.getCallCount(), 2);
inTime = Formatter.toTimeFormat2(inTime);
- exeTime = Formatter.toTimeFormat(input.getElapsedTime());
+ exeTime = Formatter.toTimeFormat4(input.getElapsedTime());
exeAvgTime = getAvgTime(input.getElapsedTime(),
input.getCallCount(), 1);
- inExeTime = Formatter.toTimeFormat(input
+ inExeTime = Formatter.toTimeFormat4(input
.getExclusiveElapsedTime());
inExeAvgTime = getAvgTime(input.getExclusiveElapsedTime(),
input.getCallCount(), 1);
time = (nTime / nCount);
}
if (nType == 1) {
- strRetrun = Formatter.toTimeFormat(time);
+ strRetrun = Formatter.toTimeFormat4(time);
} else {
strRetrun = Formatter.toTimeFormat2(time);
}
}
long ms = longTime % 1000;
longTime /= 1000;
- long second = longTime % 60;
+// second can exceed 60 because it's the biggest unit here (minute is not used)
+// long second = longTime % 60;
+ long second = longTime;
String strSecond = Long.toString(second);
if (strSecond.length() < 2) {
return output;
}
+ public static String toTimeFormat4(Object time) {
+ long longTime = -1;
+ if (time instanceof Long || time instanceof Integer) {
+ longTime = (Long) time;
+ } else if (time instanceof String) {
+ longTime = Long.parseLong((String) time);
+ } else {
+ return null;
+ }
+
+ longTime /= 1000;
+ long ms = longTime % 1000;
+ longTime /= 1000;
+// second can exceed 60 because it's the biggest unit here (minute is not used)
+// long second = longTime % 60;
+ long second = longTime;
+// longTime /= 60;
+// long minute = longTime % 60;
+// String strMinute = Long.toString(minute);
+// if (strMinute.length() < 2) {
+// strMinute = "0" + strMinute; //$NON-NLS-1$
+// }
+
+ String strSecond = Long.toString(second);
+ if (strSecond.length() < 2) {
+ strSecond = "0" + strSecond; //$NON-NLS-1$
+ }
+
+ String strMs = Long.toString(ms);
+ if (strMs.length() == 2) {
+ strMs = "0" + strMs; //$NON-NLS-1$
+ } else if (strMs.length() == 1) {
+ strMs = "00" + strMs; //$NON-NLS-1$
+ }
+
+// String output = strMinute + ":" + strSecond + "." + strMs; //$NON-NLS-1$ //$NON-NLS-2$
+ String output = strSecond + "." + strMs; //$NON-NLS-1$ //$NON-NLS-2$
+ return output;
+ }
+
public static String toPercentageFormat(Double input) {
String ret = String.format("%.2f", input); //$NON-NLS-1$
ret += " %"; //$NON-NLS-1$