-
Notifications
You must be signed in to change notification settings - Fork 240
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
Temperature Over Time #1366
Comments
Yeah, it's something I wanted to do (I made a comment a while ago in #205), but haven't had time with other stuff in life. |
@ClementTsang I see! That's helpful to get more context from those other issues. I think I'll fork and make a mess, but try some things out. If I come up with anything I'll share it back here for your consideration. |
Ok so my main focus area is the fact that all of these widgets for graphs have to implement a different draw function depending on the data they receive. flowchart TD
subgraph src/canvas.rs
A[struct Painter] --> B[impl Painter.draw_data]
end
subgraph src/canvas/widgets/cpu_graph.rs
B --> C[impl Painter.draw_cpu]
end
subgraph src/canvas/widgets/mem_graph.rs
B --> D[impl Painter.draw_memory_graph]
end
subgraph src/canvas/widgets/network_graph.rs
B --> E[impl Painter.draw_network]
end
|
This is already kind of how it works. Which really helps me hone in on: "how do I remove all these My current hunch is that it's just a poor separation of concerns: This is tricky. So there's From an ergonomics perspective I think I would enjoy having App not be in charge of so much itself, but instead delegate it out to the widgets. So my near target is to have the widgets own their I think it would be much easier to get down to a single TLDR; there's too much state in my paint! |
I've been exploring more and it seems like separation of concerns is a bit difficult. There are good reasons for everything to be scoped the way it is, but there are ways to separate concerns with a little more added complexity. One of my big goals is to have the If we're talking about a Model View Controller framework (which bottom uses?) then the However, we also have the concept of the I first thought it would be good to separate collection to each It would be inefficient at this moment to have each widget have a thread for collecting their info because they would all make redundant calls with This pattern could be handled by Channels. However we would now need a thread to pull data into the state objects.
Downside: need thread to pull data out of the channel. Goal: give In the end this will give the states higher authority over their data and we can potentially move the States being responsible for their data allows us to then focus on making widgets be Models:
etc. I would probably also do away with the term |
Checklist
Describe the feature request
My motivation is that I have issues on my computer where it overheats, and crashes. I'm actually not sure it's overheating though.
I was looking at the code and readme which caused me to notice that there are essentially Widgets with Graphs and Widgets without Graphs.
I also noticed you doing a larger rewrite of the widget system to improve extensibility #374
I think the core issue why I can't graph temperatures is related to this lack of extensibility.
From my personal exploration:
My expectations would be that I could convert either one of these metrics into an instantaneous table or a graph as suits me. Though I can also understand particular widgets like the process table being different...
The text was updated successfully, but these errors were encountered: