Remove unused NetworkRequest.durationDisplay getter and test - #9992
Open
hannah-hyj wants to merge 1 commit into
Open
Remove unused NetworkRequest.durationDisplay getter and test#9992hannah-hyj wants to merge 1 commit into
hannah-hyj wants to merge 1 commit into
Conversation
Removes durationDisplay from NetworkRequest and its corresponding unit test in network_model_test.dart. The getter was not used anywhere in DevTools production code (durations are formatted directly via durationText in DurationColumn and HttpRequestOverviewView), which was causing DCM's check-unused-code to fail with 'getter durationDisplay is used only in tests'.
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the unused @visibleForTesting getter durationDisplay from the NetworkRequest class in network_model.dart, as well as its corresponding unit tests in network_model_test.dart. There are no review comments, and I have no feedback to provide.
srawlins
approved these changes
Sep 1, 2026
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.
I keep seeing "Dart Code metric" CI failing in PRs that didn't touch [network_model.dart]

This PR is to fix that by removing durationDisplay from NetworkRequest and its corresponding unit test in network_model_test.dart. The getter was not used anywhere in DevTools production code (durations are formatted directly via durationText in DurationColumn and HttpRequestOverviewView), which was causing DCM's check-unused-code to fail with 'getter durationDisplay is used only in tests'.
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcomeorgood-first-issuelabel.contributions-welcomeorgood-first-issuelabel. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.If you need help, consider asking for help on Discord.