Skip to content

Commit 0883d99

Browse files
authored
Fix high CPU usage when polling data from a Logstash diagnostic path (#13)
1 parent 579eb59 commit 0883d99

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.7.1
2+
- Fixed high CPU usage when polling data from a Logstash diagnostic path (`--diagnostic-path`).
3+
14
## 0.7.0
25
- Logstash APIs are now fetched concurrently, improving the overall performance, and reducing UI lags when pipelines are too complex or contains several components. [#12](https://github.com/edmocosta/tuistash/pull/12)
36

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ documentation = "https://github.com/edmocosta/tuistash"
77
keywords = ["logstash", "tui", "cli", "terminal"]
88
categories = ["command-line-utilities"]
99
authors = ["Edmo Vamerlatti Costa <[email protected]>"]
10-
version = "0.7.0"
10+
version = "0.7.1"
1111
edition = "2021"
1212

1313
[dependencies]

src/cli/commands/tui/backend.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,11 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
9696

9797
if app.sampling_interval.is_some() && last_tick.elapsed() >= tick_interval {
9898
app.on_tick();
99-
last_tick = Instant::now();
10099
}
101100
if app.should_quit {
102101
return Ok(());
103102
}
103+
104+
last_tick = Instant::now();
104105
}
105106
}

0 commit comments

Comments
 (0)