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 SPDX tag-value format object #605

Merged
merged 2 commits into from
Nov 2, 2021
Merged

Add SPDX tag-value format object #605

merged 2 commits into from
Nov 2, 2021

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Oct 29, 2021

Closes #590

This PR ports the last of the package presenter objects to a format object (with encoding only, no decoder or validator). Since this is the last object there is a little more clean up work that was additionally done:

  • Swaps the presenter utils to the formats utils in the cmd package.
  • Removes the presenter package altogether, swapping for a single global definition

Future work:

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman requested a review from a team October 29, 2021 15:48
@wagoodman wagoodman self-assigned this Oct 29, 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.54ms ± 1%    1.23ms ± 6%  -19.77%  (p=0.008 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2        3.10ms ± 8%    2.48ms ± 2%  -20.14%  (p=0.008 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     918µs ± 1%     745µs ± 1%  -18.88%  (p=0.008 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                 948µs ± 2%     755µs ± 1%  -20.33%  (p=0.008 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                  954µs ± 1%     773µs ± 1%  -19.02%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                  13.1ms ± 1%    10.6ms ± 1%  -19.15%  (p=0.008 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                 1.24ms ± 2%    1.03ms ± 1%  -17.07%  (p=0.008 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2       764ns ± 1%     612ns ± 1%  -19.84%  (p=0.008 n=5+5)

name                                                   old alloc/op   new alloc/op   delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2           227kB ± 0%     227kB ± 0%   -0.41%  (p=0.008 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2         980kB ± 0%     980kB ± 0%   -0.05%  (p=0.008 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     192kB ± 0%     192kB ± 0%     ~     (p=0.151 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                 211kB ± 0%     211kB ± 0%   -0.21%  (p=0.008 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                  217kB ± 0%     217kB ± 0%   +0.00%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                  3.12MB ± 0%    3.12MB ± 0%     ~     (p=0.690 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                 1.26MB ± 0%    1.26MB ± 0%   -0.00%  (p=0.008 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2        336B ± 0%      336B ± 0%     ~     (all equal)

name                                                   old allocs/op  new allocs/op  delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2           5.46k ± 0%     5.46k ± 0%     ~     (all equal)
ImagePackageCatalogers/python-package-cataloger-2         18.1k ± 0%     18.1k ± 0%     ~     (p=0.849 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     4.80k ± 0%     4.80k ± 0%     ~     (all equal)
ImagePackageCatalogers/dpkgdb-cataloger-2                 5.53k ± 0%     5.53k ± 0%     ~     (all equal)
ImagePackageCatalogers/rpmdb-cataloger-2                  6.22k ± 0%     6.22k ± 0%     ~     (all equal)
ImagePackageCatalogers/java-cataloger-2                   51.5k ± 0%     51.5k ± 0%     ~     (p=1.000 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                  5.49k ± 0%     5.49k ± 0%     ~     (p=0.333 n=5+4)
ImagePackageCatalogers/go-module-binary-cataloger-2        9.00 ± 0%      9.00 ± 0%     ~     (all equal)

@spiffcs
Copy link
Contributor

spiffcs commented Nov 1, 2021

So happy this is here!

@spiffcs spiffcs merged commit ecab44b into main Nov 2, 2021
@spiffcs spiffcs deleted the add-spdx-tv-format branch November 2, 2021 17:45
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* add new spdx tag-value format

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* remove public presenter package

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
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.

Port remaining package presenters to format objects
2 participants