-
Notifications
You must be signed in to change notification settings - Fork 16
SY-3420: Enable Console Performance Profiling - PART 1 #1799
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
Open
sy-nico
wants to merge
41
commits into
rc
Choose a base branch
from
sy-3420-add-console-performance-profiling
base: rc
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.
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
…nd tests. Current dahsboard is simply a draft.
…ysis code - Use pre-allocated SampleBuffer with fixed 30-sample window comparison - Handle Long Tasks API unavailability on WebKit platforms - Extract shared runAnalysis helper and consolidate types in analyzer/types.ts - Remove transient data from Redux slice, add reset() to collectors - Move FPS degradation detection into DegradationDetector for consistency with LeakDetector - Move CpuAnalyzer into cpu-analyzer for consistency with DegradationDetector and LeakDetector
…formance-profiling
… details/information.
…arn/error, latching behavior ,nominal)
…formance-profiling
…ture - Add comprehensive tests for SampleBuffer, analyzers (heap, fps, cpu, gpu), and slice reducers (89 new tests) - Extract ResourceAnalyzer and PollingCollector base classes to reduce code duplication - Add versioned types infrastructure (types/v0.ts) for future schema migrations - Add workflow registry pattern for extensible profiling workflows - Rename framerate.ts → fps.ts for consistency - Remove unnecessary range creation retry logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
96 files reviewed, 2 comments
Contributor
Author
|
@greptile, comments have been addressed and 0 byte driver file has been restored to |
…formance-profiling
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.
Issue Pull Request
Linear Issue
SY-3420
Description
This is part 1/2 of a larger effort to test and capture console profiling metrics. This set of changes provides the infrastructure for which we can create automated testing. Part 2 will consistent of the automated
Macrosand integration tests. So why build a whole dashboard and profiler for the console?Current Problems
Benefits:
Profiling
Testing
Customer debugging tools
Architecture
profiler.mp4
dashboard.mp4
Basic Readiness
Greptile Summary
Adds comprehensive performance profiling infrastructure to the console application, enabling real-time CPU, GPU, FPS, and heap monitoring with automated issue detection and Synnax range persistence.
Architecture:
requestAnimationFrame), heap (viaperformance.memory), network requests (Resource Timing API), long tasks (Long Task API), and console logs (intercepted)Key Design Patterns:
Dashboard.tsxSampleBufferTesting:
13 test files with comprehensive coverage including unit tests for analyzers, buffer, report compiler, selectors, slice reducers, and macro system
Benefits:
Confidence Score: 5/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant Dashboard participant useCollectors participant useProfilingSession participant useProfilingRange participant Analyzers participant Redux participant Synnax User->>Dashboard: Click Start Dashboard->>Redux: dispatch(Perf.start()) Redux-->>Dashboard: status="running" Dashboard->>useCollectors: Initialize collectors useCollectors->>useCollectors: Create CPU/GPU/FPS/Heap/Network/LongTask/Console collectors useCollectors->>useCollectors: Start setInterval(1000ms) Dashboard->>useProfilingSession: Setup session useProfilingSession->>useProfilingRange: createRange(startValues) useProfilingRange->>Synnax: Create range with metadata Synnax-->>useProfilingRange: rangeKey useProfilingRange->>Redux: setRangeKey() loop Every 1 second (while running) useCollectors->>useCollectors: collectSample() useCollectors->>useCollectors: Push to SampleBuffer useCollectors->>useProfilingSession: handleSample(sample, buffer) useProfilingSession->>Analyzers: analyze(samples, aggregates) Analyzers-->>useProfilingSession: {leak, fps, cpu, gpu} reports useProfilingSession->>Redux: setReports({leak, fps, cpu, gpu}) useProfilingSession->>useProfilingRange: addMetricLabel() [if threshold exceeded] useProfilingRange->>Synnax: Add warning/error label to range end loop Every 5 seconds (while running) useProfilingRange->>useProfilingRange: writeMetrics() useProfilingRange->>Synnax: Update range metadata (averages, peaks) end User->>Dashboard: Click Pause Dashboard->>Redux: dispatch(Perf.pause()) Redux-->>Dashboard: status="paused" useProfilingSession->>useProfilingSession: captureFinal(lastSample) useProfilingSession->>useProfilingRange: updateEndTime() useProfilingRange->>Synnax: Update range timeRange User->>Dashboard: Click Reset Dashboard->>Redux: dispatch(Perf.reset()) Redux-->>Dashboard: status="idle" useProfilingSession->>Analyzers: Final analysis Analyzers-->>useProfilingSession: Final severities useProfilingSession->>useProfilingRange: finalizeRange(severities, stopValues) useProfilingRange->>Synnax: Add final labels + metadata useProfilingSession->>useProfilingSession: Cleanup (reset buffers, collectors)