public static void main(String[] args) {
/* Read a trace and build the state system */
try {
- File newStateFile = new File("/tmp/helloworldctf.ht"); //$NON-NLS-1$
+ File newStateFile = new File("/tmp/helloworldctf.ht");
IStateChangeInput input = new CtfKernelStateInput(CtfTmfTestTraces.getTestTrace(1));
ITmfStateSystem ss = StateSystemManager.loadStateHistory(newStateFile, input, true);
List<ITmfStateInterval> stateIntervals;
StringBuilder output = new StringBuilder();
- currentThreadByCPUS = ssb.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+ currentThreadByCPUS = ssb.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD);
for (Integer currentThread : currentThreadByCPUS) {
stateIntervals = ssb.queryHistoryRange(currentThread.intValue(), ssb.getStartTime(),
ssb.getCurrentEndTime());
/* Output formatting */
- output.append("Value of attribute : "); //$NON-NLS-1$
+ output.append("Value of attribute : ");
output.append(ssb.getFullAttributePath(currentThread.intValue()));
- output.append("\n------------------------------------------------\n"); //$NON-NLS-1$
+ output.append("\n------------------------------------------------\n");
for (ITmfStateInterval stateInterval : stateIntervals) {
/* Print the interval */
output.append('[');
output.append(String.valueOf(stateInterval.getStartTime()));
- output.append(", "); //$NON-NLS-1$
+ output.append(", ");
output.append(String.valueOf(stateInterval.getEndTime()));
output.append(']');
/* Print the attribute value */
- output.append(" = "); //$NON-NLS-1$
+ output.append(" = ");
output.append(stateInterval.getStateValue().unboxInt());
output.append('\n');
}