azat / chdig

Dig into ClickHouse with TUI interface.
MIT License
123 stars 13 forks source link

add "Seek N mins backward" and "Seek N mins forward" #40

Closed Dolso closed 8 months ago

Dolso commented 8 months ago

Hello!

Problem

The already existing "Seek 10 mins backward" and "Seek 10 mins forward" may not be enough, because sometimes you need to get data from query_log that was recorded several hours ago. So you have to press the same button a lot in a row, which is not very convenient

Solution

As a solution to the problem, I propose to add 2 actions where we will shift not by 10 minutes, but by user entered value. That said, I find "Seek 10 mins backward" and "Seek 10 mins forward" useful too, because you don't always need to shift the period by a large value

Disadvantages of the solution

Code deficiencies

I apologize in advance for my code. I know very little about Rust

Thank you in advance!

azat commented 7 months ago

@Dolso I was thinking about this more, and I think at least it should accept time range (date begin, end), not number of minutes, since usually you have time frame

Dolso commented 7 months ago

@Dolso I was thinking about this more, and I think at least it should accept time range (date begin, end), not number of minutes, since usually you have time frame

Ok, I can try to implement later if it's not urgent

azat commented 7 months ago

Ok, I can try to implement later if it's not urgent

It is not, thank you!

Dolso commented 7 months ago

I made a separate pull request: https://github.com/azat/chdig/pull/42