It is sometimes required to get also the timestamp of the events.
Change-Id: I013d91cbba4732245b1981b4e88f9c7648d05ec8
Signed-off-by: Naser Ezzati <n.ezzati@polymtl.ca>
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/34471
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Hudson CI
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.linuxtools.tmf.analysis.xml.core;singleton:=true
Bundle-Activator: org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator
</parent>
<artifactId>org.eclipse.linuxtools.tmf.analysis.xml.core</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>Linux Tools TMF Xml Analysis Core Plug-in</name>
if (fieldName.equals(TmfXmlStrings.CPU)) {
return TmfStateValue.newValueInt(Integer.valueOf(event.getSource()));
}
+ /* Exception also for "TIMESTAMP", returns the timestamp of this event */
+ if (fieldName.equals(TmfXmlStrings.TIMESTAMP)) {
+ return TmfStateValue.newValueLong(event.getTimestamp().getValue());
+ }
if (content.getField(fieldName) == null) {
return value;
}
* This file defines all name in the XML Structure for the State Provider
*
* @author Florian Wininger
+ * @noimplement This interface only contains static defines
*/
@SuppressWarnings({ "javadoc", "nls" })
@NonNullByDefault
static final String STACK_PEEK = "peek";
static final String CPU = "cpu";
+ /**
+ * @since 1.2
+ */
+ static final String TIMESTAMP = "timestamp";
+
/* Operator type */
static final String NOT = "not";
static final String AND = "and";