Repository navigation
feat(telemetry): asset compression telemetry & payload size diagnostic - #39
Merged
Merged
Conversation
…oad size diagnostic engine
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
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.
Architecture & System Overview
Large static site builds and Single Page Application bundles frequently encounter unmonitored payload bloat, degrading Largest Contentful Paint (LCP) and mobile web performance. This pull request introduces a dedicated Build Asset Compression Telemetry & Payload Size Diagnostic Engine in
src/buildsite/asset_telemetry.pypaired with a test suite intests/test_asset_telemetry.py.Core Components & Capabilities:
Asset Classification & Category Segmentation:
JS,CSS,HTML,IMAGE,FONT, andOTHER.Compression Efficiency Diagnostics:
Global Bundle Ceilings:
Automated Diagnostic Reporting:
Diagnostic Verification Matrix
test_asset_category_from_path: Confirms extension routing for standard web types (.js, .css, .html, .svg, .woff2).test_record_asset_compression_calculation: Asserts exact compression computation, ratio determination, and OK severity.test_record_empty_asset: Confirms zero-byte files are handled gracefully without zero-division errors.test_asset_size_budget_breach: ValidatesCRITICALseverity flags when assets cross individual ceilings.test_suboptimal_compression_warning: AssertsWARNINGseverity when compressible categories yield poor compression factors.test_global_bundle_budget_breach: Confirms global bundle warnings when aggregate payload thresholds are breached.test_diagnostic_report_and_reset: Asserts Markdown table rendering and collector memory reset.