Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other: use custom time chart grid implementation #937

Merged
merged 9 commits into from
Dec 30, 2022

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Dec 30, 2022

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Pulls in the tui-rs grid logic so I can implement custom braille painting logic. We basically "flatten" the layering logic into a single layer by replacing resetting cells if the colour is different. This avoids the multiple allocations if we used multiple layers as intended with tui-rs.

This gives us chart results similar to the current stable version, but with a flamegraph similar to the current master branch. See (top is this branch, bottom is stable):

image

Issue

If applicable, what issue does this address?

Closes: #933

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2022

Codecov Report

Base: 20.07% // Head: 19.64% // Decreases project coverage by -0.42% ⚠️

Coverage data is based on head (43afaeb) compared to base (21a21b8).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #937      +/-   ##
==========================================
- Coverage   20.07%   19.64%   -0.43%     
==========================================
  Files          74       75       +1     
  Lines       14247    14558     +311     
==========================================
  Hits         2860     2860              
- Misses      11387    11698     +311     
Impacted Files Coverage Δ
src/components/tui_widget/time_chart.rs 48.28% <ø> (ø)
src/components/tui_widget/time_chart/canvas.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Vendors in tui-rs' time chart render logic so I can set a custom logic
for braille painting.
@ClementTsang ClementTsang marked this pull request as ready for review December 30, 2022 07:28
@ClementTsang ClementTsang merged commit efcf2bd into master Dec 30, 2022
@ClementTsang ClementTsang deleted the fix_graph_rendering branch December 30, 2022 08:06
@ClementTsang ClementTsang mentioned this pull request Feb 3, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] CPU graph looks way too big and does not respect dot_marker anymore
2 participants