Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Questions about trace filters and timestamps

Hi Dave,

For CONTAINS, EQUALS and MATCHES nodes, all matching is done on the string representation of the aspect, e.g. what you see in the table.

For timestamps to be considered as values, you should use the COMPARE node with the Timestamp type. Then the 'value' entered for comparison needs to be in seconds (optionally with decimals up to nanoseconds).

You can see the numerical value of the timestamp of an event by selecting it in the event table and looking at the Properties view (Timestamp -> value property).

If you use the Num type in COMPARE node with a timestamp (or any aspect), then unless the aspect is already a Number object, the number used by comparison is whatever Java can parse the string to as a number (using Long.decode() or NumberFormat.parse()). So if your timestamp is yyyy-mm-dd hh:mm:ss, this only parses the year as a number.


On Tue, Nov 7, 2017 at 11:04 AM, David Wootton <dwootton@xxxxxxxxxx> wrote:

I constructed a filter for the timestamp column of my trace, where the set of trace aspects includes the Timestamp aspect from the TmfBaseAspects class.

If I construct a filter using the EQUALS operator, it acts as it there is a strict string comparison, including any trailing spaces in the value specified in the field, and will match the single row in the trace with the timestamp as long as there are no trailing spaces in the value in the filter.

If I construct a filter using the COMPARE operator for the timestamp column that only seems to work correctly when I define the data type as alpha. If I use the timestamp type, it seems like all rows pass the filter.

Is the intent for the Timestamp aspect to be treated as a String? How would the timestamp type be used?


tracecompass-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top