Timestamp Precision Filter¶
The foglamp-filter-timestamp-precision filter implements a mechanism to round timestamp of readings within a pipeline.
Filter Configuration¶
The configuration options supported by the timestamp-precision filter are
Time Unit: Time unit to round the reading timestamp. Available options are Hour, Minute, Second, Millisecond and Microsecond.
Round Timestamp To The Nearest: Change timestamp of reading by rounding to the nearest 10, 100, 1000. This option is available only for second, millisecond and microsecond.
Rounding Method: Options to round timestamp of reading are Truncate, Round Up and Round Down.
Note
Seconds can be rounded to the nearest 10 only.
Examples¶
Timestamp In |
Timestamp Out |
Rounding Method |
Time Unit |
Round To The Nearest |
Description |
---|---|---|---|---|---|
2025-01-10 10:01:03.123456+0:00 |
2025-01-10 10:00:00.000000 |
Truncate |
Hour |
NA |
Minutes,Seconds,Milliseconds and Microseconds are truncated |
2025-01-10 10:01:03.123456+0:00 |
2025-01-10 10:01:00.000000 |
Truncate |
Minute |
NA |
Seconds,Milliseconds and Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:30.000000 |
Round Up |
Second |
10 |
23s converted to 30s. Milliseconds and Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:20.000000 |
Round Down |
Second |
10 |
23s converted to 20s. Milliseconds and Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:00.000000 |
Truncate |
Second |
NA |
23s converted to 20s. Milliseconds and Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.200000 |
Round Up |
Millisecond |
100 |
123s converted to 200s. Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.100000 |
Round Down |
Millisecond |
100 |
123s converted to 100s. Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.000000 |
Truncate |
Millisecond |
NA |
Milliseconds and Microseconds are truncated |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.123460 |
Round Up |
Microsecond |
10 |
456 ms converted to 460 ms. |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.123450 |
Round Down |
Microsecond |
10 |
456 ms converted to 450 ms. |
2025-01-10 10:01:23.123456+0:00 |
2025-01-10 10:01:23.123000 |
Truncate |
Microsecond |
NA |
Microseconds are truncated |
2025-01-10 10:01:57.123456+0:00 |
2025-01-10 10:02:00.000000 |
Round Up |
Second |
10 |
Overflow case : After rounding 57 second became one minute. |
2025-01-10 10:01:03.999456+0:00 |
2025-01-10 10:01:04.000000 |
Round Up |
Millisecond |
10 |
Overflow case : After rounding 999 millisecond became one second. |
2025-01-10 10:01:03.999996+0:00 |
2025-01-10 10:01:04.00000 |
Round Up |
Microsecond |
10 |
Overflow case : After rounding 999996 Microsecond became one second. |