-
Notifications
You must be signed in to change notification settings - Fork 12
Performance Diagnostics #1128
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
Draft
AdvancedImagingUTSW
wants to merge
13
commits into
develop
Choose a base branch
from
gui_capture
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Performance Diagnostics #1128
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduced docs/capture_gui.py for automated screenshot capture of GUI components using mss and tkinter. Updated pyproject.toml to include 'mss' in the docs dependencies.
Introduces a new DiagnosticsPopupWindow class that displays six diagnostic plots (e.g., latency, FPS, memory usage) in a resizable popup using matplotlib and Tkinter. Also updates ChannelCreator's defocus spinboxes to set min, max, and increment values for improved input validation.
Introduces performance diagnostics, including histograms for image display, histogram update, stage move, and image acquisition times, parsed from log files. Adds a button to save a screenshot of the diagnostics popup.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1128 +/- ##
===========================================
- Coverage 53.93% 53.63% -0.30%
===========================================
Files 191 194 +3
Lines 21953 22198 +245
===========================================
+ Hits 11840 11906 +66
- Misses 10113 10292 +179
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Introduces a custom PERFORMANCE log level and handler, updates logging configuration to support performance logs, and refines the PerformanceFilter logic. Improves type annotations and docstrings in diagnostics_popup.py, adjusts screenshot capture to use the correct widget, and resizes diagnostic.
Added type annotations and expanded docstrings for DeviceBase and SerialDevice classes.
Now inherits from Serial library and overwrites readline and write methods to include logging. Need to test.
This reverts commit 2e9b67f.
Different approach to logging serial communication.
Will test with ASI Tiger Controller next... Also added the logic necessary to round the stage values before reporting them. I was getting floats with ~10 decimal places...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request draft introduces a new diagnostics popup feature for performance monitoring, adds supporting infrastructure, and improves logging and documentation.
@annie-xd-wang - I wanted to see if there were particular points in the code that you were hoping to monitor. If so, we can add the appropriate regular expressions to pull out the time it takes to execute that section of code, and we can populate a histogram or line plot in this popup.
I also wanted to see if there was a better way to capture screenshots of our GUI. Our documentation is increasingly out of date, and I thought it would be nice to automate capturing screenshots. I added a new dependency to do this, but I then realized that PIL provides the basic functionality needed and that additional dependency may not be necessary.
So, don't merge, but I would love your feedback on what we should monitor. The time necessary to save the data is another area that could be valuable.
New Diagnostics Popup Feature:
DiagnosticsPopupController
class, which manages a diagnostics popup window for visualizing performance metrics from log files. This includes methods for displaying, updating, and saving diagnostic plots, and is integrated with the application's logging system. (src/navigate/controller/sub_controllers/diagnostics_popup.py
)DiagnosticsPopupController
in the sub-controller initialization and imported the corresponding view class. (src/navigate/controller/sub_controllers/__init__.py
,src/navigate/controller/sub_controllers/menus.py
) [1] [2] [3]src/navigate/controller/sub_controllers/menus.py
) [1] [2]Logging and Diagnostics Improvements:
src/navigate/controller/sub_controllers/histogram.py
) [1] [2] [3]src/navigate/controller/controller.py
)Documentation and Dependency Updates:
docs/capture_gui.py
to automate capturing screenshots of various GUI windows and tabs. (docs/capture_gui.py
)pyproject.toml
to include themss
package (for screenshot functionality) and fixed formatting in the docs dependencies list. (pyproject.toml
) [1] [2]Minor Code Quality Improvements:
src/navigate/controller/controller.py
) [1] [2]src/navigate/log_files/log_functions.py
)