Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wagoodman
Copy link
Contributor

When originally developing the java manifest parsing it was heavy in returning errors over returning partial results. This PR adjusts the behavior of the parser to be "best-effort" and return results when possible (even if partial).

@wagoodman wagoodman requested a review from a team December 14, 2021 16:56
@wagoodman wagoodman self-assigned this Dec 14, 2021
@wagoodman wagoodman added the bug Something isn't working label Dec 14, 2021
@github-actions
Copy link

Benchmark Test Results

Benchmark results from the latest changes vs base branch
name                                                       old time/op    new time/op    delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2              1.52ms ± 6%    1.52ms ± 7%     ~     (p=1.000 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2            3.89ms ± 7%    3.77ms ± 0%     ~     (p=0.151 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2    1.13ms ± 2%    1.10ms ± 1%   -2.61%  (p=0.008 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         894µs ± 4%     898µs ± 0%     ~     (p=0.690 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                    1.08ms ± 2%    1.08ms ± 1%     ~     (p=0.690 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                      930µs ± 3%     918µs ± 1%     ~     (p=0.548 n=5+5)
ImagePackageCatalogers/java-cataloger-2                      11.7ms ± 2%    12.1ms ± 2%   +2.75%  (p=0.032 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                     1.51ms ± 2%    1.50ms ± 2%     ~     (p=0.841 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2          1.78µs ± 3%    1.96µs ± 1%  +10.06%  (p=0.008 n=5+5)

name                                                       old alloc/op   new alloc/op   delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2               297kB ± 0%     296kB ± 0%   -0.28%  (p=0.008 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2            1.32MB ± 0%    1.32MB ± 0%     ~     (p=0.151 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2     282kB ± 0%     282kB ± 0%     ~     (p=0.111 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         222kB ± 0%     222kB ± 0%   -0.23%  (p=0.008 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                     281kB ± 0%     281kB ± 0%   -0.20%  (p=0.032 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                      245kB ± 0%     245kB ± 0%   -0.01%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                      3.41MB ± 0%    3.41MB ± 0%     ~     (p=0.841 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                     1.36MB ± 0%    1.36MB ± 0%     ~     (p=0.222 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2            560B ± 0%      560B ± 0%     ~     (all equal)

name                                                       old allocs/op  new allocs/op  delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2               9.32k ± 0%     9.32k ± 0%     ~     (p=1.000 n=4+5)
ImagePackageCatalogers/python-package-cataloger-2             39.7k ± 0%     39.7k ± 0%     ~     (p=0.302 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2     9.74k ± 0%     9.74k ± 0%     ~     (p=0.286 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         6.21k ± 0%     6.21k ± 0%     ~     (all equal)
ImagePackageCatalogers/dpkgdb-cataloger-2                     8.99k ± 0%     8.99k ± 0%     ~     (all equal)
ImagePackageCatalogers/rpmdb-cataloger-2                      7.50k ± 0%     7.50k ± 0%     ~     (all equal)
ImagePackageCatalogers/java-cataloger-2                       68.8k ± 0%     68.8k ± 0%     ~     (p=0.452 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                      11.6k ± 0%     11.6k ± 0%     ~     (p=0.286 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2            13.0 ± 0%      13.0 ± 0%     ~     (all equal)

Copy link
Contributor

@luhring luhring left a comment

Choose a reason for hiding this comment

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

Awesome

@luhring luhring merged commit 727b84c into main Dec 14, 2021
@luhring luhring deleted the more-java-manifest-edge-cases branch December 14, 2021 17:17
spiffcs pushed a commit that referenced this pull request Jan 4, 2022
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
spiffcs pushed a commit that referenced this pull request Jan 4, 2022
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
fengshunli pushed a commit to fengshunli/syft that referenced this pull request Jan 24, 2022
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants