Fix dmce-summary-bin --filter not filtering correctly #24
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.
When using dmce-summary-bin with the --filter option, it more or less always misses one probe that should have been excluded. This is because a break happens after updating the condition but before we print the filter line.
Example using the "simple" program from dmce-examples (with "--filter 100" set for illustrative purposes):
Before any filtering:
![before](https://private-user-images.githubusercontent.com/29545130/340991685-7f90052c-1c5b-4c47-8400-1fcc133f1279.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0ODQ0MzgsIm5iZiI6MTcyNTQ4NDEzOCwicGF0aCI6Ii8yOTU0NTEzMC8zNDA5OTE2ODUtN2Y5MDA1MmMtMWM1Yi00YzQ3LTg0MDAtMWZjYzEzM2YxMjc5LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDIxMDg1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4ODdlMWFiNDU2ZWRiMjhlOGY1MmU1ZjZkMzkyMzg5YzNlNjQ1ODQ5NjI1YTBhMjMyMzc1ZGU2OTA3NTZlMWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QJJkhWu5PCnrLsxOd6boSFccBkNxod-U5Cy5zjdjd9w)
After using "--filter 100":
![after](https://private-user-images.githubusercontent.com/29545130/340991961-ed739696-40e1-42f0-bc10-5af2f5ba1574.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0ODQ0MzgsIm5iZiI6MTcyNTQ4NDEzOCwicGF0aCI6Ii8yOTU0NTEzMC8zNDA5OTE5NjEtZWQ3Mzk2OTYtNDBlMS00MmYwLWJjMTAtNWFmMmY1YmExNTc0LlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDIxMDg1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwYmY1MmEzNTNhMjc0MGZlODhhZTE0OWEwMWRlZDdhYTA1NTgwMDU4YWYzMmFmNGM1NzJiYmZjYWRmYjk5MmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.M3Uuh9kQ3dZRVNbvjwZzvFpJjcNzG9Jn_77yN37Q85g)
Looking at the output when using "--filter 100" we see that it misses one probe.
Before this fix:
![image](https://private-user-images.githubusercontent.com/29545130/340992604-403d956e-ab52-481c-ac22-b5ef2cc1482d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0ODQ0MzgsIm5iZiI6MTcyNTQ4NDEzOCwicGF0aCI6Ii8yOTU0NTEzMC8zNDA5OTI2MDQtNDAzZDk1NmUtYWI1Mi00ODFjLWFjMjItYjVlZjJjYzE0ODJkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDIxMDg1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyNDBlOTJjOTZmZDliZWM1MmY0NmQyYjJkNmE4Y2U4OWIyZDljMGI3MTgyNTEwY2Q4ODRkNzdlYWY1NTViZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RoyhR6bavKL1yN1qX63_wU5rGKOyKiGpe7fs-AmKdUk)
After this fix:
![image](https://private-user-images.githubusercontent.com/29545130/340992954-b869a08d-4855-457a-8e29-95b5258d157a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU0ODQ0MzgsIm5iZiI6MTcyNTQ4NDEzOCwicGF0aCI6Ii8yOTU0NTEzMC8zNDA5OTI5NTQtYjg2OWEwOGQtNDg1NS00NTdhLThlMjktOTViNTI1OGQxNTdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA0VDIxMDg1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNkZWE1MTNjYWZjYzIxNDI1OGFlM2ZiY2E4OWYzY2NiNjFmZmZmZGVjOTgxNjFlMWU4YzYwMmNlZjY5MmNhMTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cxfc4gspZt3qztjwjq16Dyv4MF-ou6OP7JwXq-KeIeg)