Skip to content
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

Add an option to filter on label names #177

Merged
merged 2 commits into from
Nov 18, 2019
Merged

Conversation

frolv
Copy link
Member

@frolv frolv commented Nov 7, 2019

This change adds a source-filter option which allows a regex to be
provided to filter the names of keys in data sources. When provided,
only keys matching the pattern will be counted as part of the reported
size. The option can be set via config files or the command line.

This change adds a `source-filter` option which allows a regex to be
provided to filter the names of keys in data sources. When provided,
only keys matching the pattern will be counted as part of the reported
size. The option can be set via config files or the command line.
src/bloaty.cc Outdated

uint64_t filtered = 0;
if (ShowFile(options)) {
filtered += toplevel_row_.filtered_filesize;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think adding the two together is the right approach. Your existing format is good for the case that we're showing only VM or file:

Filtering enabled (source_filter); omitted 15.1Mi of entries

For the case that both VM and file are shown lets do this instead:

Filtering enabled (source_filter); omitted file=12.5Mi, vm=1.2Mi of entries

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, updated.

@haberman haberman merged commit 08f59b2 into google:master Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants