mrodalgaard / language-log

Log file syntax highlighting in Atom
MIT License
42 stars 9 forks source link

FEATURE REQUEST: Timeline indicator at the bottom #40

Closed calvinkehl closed 6 years ago

calvinkehl commented 6 years ago

description

a small indicator at the bottom (above the filter etc.) of what time-range is visible at the specific moment.

implementation idea

takes the first and the last timestamp of the file and calculates the step size. then takes the first and the last timestamp of the visible excerpt and calculates where the indicator(s) should be placed.

example

first log timestamp: 01-26 08:00:00.000 last log timestamp: 01-26 10:00:00.000 the timerange is: 2 hours, or 120 minutes, or 7200 seconds. if the editor is 1000px wide, 1px = 7.2 seconds. at timestamp 01-26 08:24:00.000 the indicator should be placed 200px from the left, because 24 min = 1440 sec and 1440 / 7.2 = 200.

you get the idea...

mrodalgaard commented 6 years ago

This is generally a good idea. I have experimented with parsing all timestamps in the full log file, but it is too cpu expensive. The part with showing where you are in the given log file is done much better using https://github.com/atom-minimap/minimap.

I have added a timeline to the log bottom bar which indicates first and last timestamps in the opened log file. This is useful for showing the full log file time span. I might add some functionality to this time line at a later point.