Skip to content

Conversation

@helio-frota
Copy link
Contributor

@helio-frota helio-frota commented Dec 12, 2025

Assisted-by: Claude Code

Before:
2025-12-12_09-26

After:
2025-12-12_13-12

Before:
https://gist.github.com/helio-frota/25af13c01066bde8c506bee4a7b32b9e

After:
https://gist.github.com/helio-frota/0d17454a2ef37c5f3cbe41f64aec6073

Summary by Sourcery

Optimize advisory recommendation query by batching related entity loading and reusing pre-fetched status and organization data.

Enhancements:

  • Batch-load advisory organizations and statuses to reduce database queries and improve performance of the recommend endpoint.
  • Refactor VersionedPurlStatus construction to accept pre-fetched status models instead of querying by ID per record.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 12, 2025

Reviewer's Guide

Optimizes the recommend endpoint by batching related entity loading (organizations and statuses) and reusing them via in-memory maps instead of issuing per-row queries, and adjusts VersionedPurlStatus construction to use these preloaded models.

Sequence diagram for batched loading in recommend endpoint

sequenceDiagram
    participant RecommendEndpoint
    participant VersionedPurlAdvisory
    participant StatusEntity
    participant AdvisoryEntity
    participant OrganizationEntity
    participant StatusModelEntity

    RecommendEndpoint->>VersionedPurlAdvisory: build_from_purl_statuses(vulns, statuses, tx)

    Note over VersionedPurlAdvisory,StatusEntity: Previously: per row status lookup
    VersionedPurlAdvisory->>StatusEntity: load_one(statuses)
    StatusEntity-->>VersionedPurlAdvisory: status_models

    Note over VersionedPurlAdvisory,AdvisoryEntity: Previously: per row organization lookup
    VersionedPurlAdvisory->>AdvisoryEntity: load_one(advisories)
    AdvisoryEntity-->>VersionedPurlAdvisory: advisory_models

    VersionedPurlAdvisory->>OrganizationEntity: load_one(advisory_models)
    OrganizationEntity-->>VersionedPurlAdvisory: organization_models

    VersionedPurlAdvisory->>VersionedPurlAdvisory: build org_map by advisory id
    VersionedPurlAdvisory->>VersionedPurlAdvisory: build status_map by status id

    loop for each vuln, advisory, purl_status
        VersionedPurlAdvisory->>VersionedPurlAdvisory: lookup status_model in status_map
        VersionedPurlAdvisory->>VersionedPurlStatus: from_entity(vuln, purl_status, status_model, tx)
        VersionedPurlStatus-->>VersionedPurlAdvisory: VersionedPurlStatus
        VersionedPurlAdvisory->>VersionedPurlAdvisory: lookup organization in org_map
        VersionedPurlAdvisory->>VersionedPurlAdvisory: push into results
    end

    VersionedPurlAdvisory-->>RecommendEndpoint: results
Loading

Updated class diagram for VersionedPurlAdvisory and VersionedPurlStatus

classDiagram
    class VersionedPurlAdvisory {
        +AdvisoryHead head
        +Vec~VersionedPurlStatus~ status
        +build_from_purl_statuses(vulns, statuses, tx) Result_Vec_VersionedPurlAdvisory_
    }

    class VersionedPurlStatus {
        +VulnerabilityHead vulnerability
        +String status
        +from_entity(vuln, package_status, status_model, tx) Result_VersionedPurlStatus_
    }

    class AdvisoryHead
    class VulnerabilityHead
    class vulnerability_Model
    class advisory_Model
    class organization_Model
    class status_Model
    class purl_status_Model

    VersionedPurlAdvisory o-- AdvisoryHead
    VersionedPurlAdvisory o-- VersionedPurlStatus
    VersionedPurlStatus o-- VulnerabilityHead
    VersionedPurlStatus ..> status_Model : uses
    VersionedPurlStatus ..> purl_status_Model : uses
    VersionedPurlAdvisory ..> advisory_Model : batches
    VersionedPurlAdvisory ..> organization_Model : batches
    VersionedPurlAdvisory ..> status_Model : batches
    VersionedPurlAdvisory ..> purl_status_Model : iterates
    advisory_Model ..> organization_Model : related
    purl_status_Model ..> status_Model : references
Loading

File-Level Changes

Change Details Files
Batch-load related organizations for advisories and reuse them via a lookup map instead of querying per advisory.
  • Collect non-empty advisory models from the loaded advisories into a Vec
  • Batch load related organizations for all advisory models using load_one
  • Build a HashMap keyed by advisory.id to map each advisory to its organization model
  • Replace advisory.find_related(...).one(tx) call inside the loop with a lookup in the precomputed org_map
modules/fundamental/src/purl/model/details/versioned_purl.rs
Batch-load status models for all purl_status entries and reuse them when constructing VersionedPurlStatus instances.
  • Batch load status::Entity models from the statuses collection using load_one
  • Build a HashMap keyed by purl_status.status_id to map each purl_status to its status model
  • Pass the looked up status_model into VersionedPurlStatus::from_entity instead of querying by ID there
modules/fundamental/src/purl/model/details/versioned_purl.rs
Refactor VersionedPurlStatus::from_entity to accept a preloaded status model and avoid its own database query.
  • Change from_entity signature to take an unused purl_status::Model reference plus an Optionstatus::Model
  • Remove the internal status::Entity::find_by_id query and use the provided status_model instead
  • Keep the fallback behavior of returning "unknown" when no status_model is available
modules/fundamental/src/purl/model/details/versioned_purl.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • In from_entity, the _package_status parameter is now unused; consider removing it from the signature (and all call sites) to simplify the API and avoid confusion about its purpose.
  • The construction of org_map and status_map performs a full clone of each model (org.clone(), status.clone()); if these structs are large, you may want to store references or lightweight identifiers instead to reduce allocation and copying overhead.
  • When creating results, you can pre-allocate with Vec::with_capacity(vulns.len()) (or a tighter bound) to avoid repeated reallocations in this hot path.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `from_entity`, the `_package_status` parameter is now unused; consider removing it from the signature (and all call sites) to simplify the API and avoid confusion about its purpose.
- The construction of `org_map` and `status_map` performs a full clone of each model (`org.clone()`, `status.clone()`); if these structs are large, you may want to store references or lightweight identifiers instead to reduce allocation and copying overhead.
- When creating `results`, you can pre-allocate with `Vec::with_capacity(vulns.len())` (or a tighter bound) to avoid repeated reallocations in this hot path.

## Individual Comments

### Comment 1
<location> `modules/fundamental/src/purl/model/details/versioned_purl.rs:120-123` </location>
<code_context>
+        let status_models = statuses.load_one(status::Entity, tx).await?;
+
+        // Create a HashMap for fast status lookup by status ID
+        let status_map: HashMap<Uuid, Option<status::Model>> = statuses
+            .iter()
+            .zip(status_models.iter())
+            .map(|(purl_status, status)| (purl_status.status_id, status.clone()))
+            .collect();
+
</code_context>

<issue_to_address>
**suggestion (performance):** Status lookups can stay index-based instead of going through a HashMap.

`statuses` and `status_models` are already positionally aligned from `load_one`, and you iterate `statuses` in order below. Rather than building a `HashMap<Uuid, Option<status::Model>>`, you can keep a `Vec<Option<status::Model>>` and use an index or `zip` in the later loop to access the matching `status_model`, avoiding the extra hash lookups and clones.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@545028c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ndamental/src/purl/model/details/versioned_purl.rs 88.00% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2183   +/-   ##
=======================================
  Coverage        ?   68.25%           
=======================================
  Files           ?      376           
  Lines           ?    21207           
  Branches        ?    21207           
=======================================
  Hits            ?    14474           
  Misses          ?     5863           
  Partials        ?      870           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@helio-frota
Copy link
Contributor Author

/scale-test

@github-actions
Copy link

🛠️ Scale test has started! Follow the progress here: Workflow Run

@github-actions
Copy link

Goose Report

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 25-12-12 17:46:52 25-12-12 17:46:59 00:00:07 0 → 7
Maintaining 25-12-12 17:46:59 25-12-12 17:51:59 00:05:00 7
Decreasing 25-12-12 17:51:59 25-12-12 17:52:57 00:00:58 0 ← 7

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
DELETE delete_sbom_from_pool_sequential[100 SBOMs] 38 (0) 0 907.21 (-44.66) 73 (-20) 2894 (+682) 0.13 (+0.00) 0.00 (+0.00)
GET download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 10 9.60 (-8.40) 2 (0) 28 (-24) 0.03 (+0.00) 0.03 (+0.00)
GET get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 10 21.70 (+10.40) 1 (0) 106 (+47) 0.03 (+0.00) 0.03 (+0.00)
GET get_advisory_by_doc_id 10 (0) 0 19.20 (-0.60) 4 (0) 57 (0) 0.03 (+0.00) 0.00 (+0.00)
GET get_analysis_latest_cpe 15 (0) 0 274.07 (-65.67) 144 (-56) 442 (-234) 0.05 (+0.00) 0.00 (+0.00)
GET get_analysis_status 15 (0) 0 13.73 (-1.80) 3 (+2) 54 (-3) 0.05 (+0.00) 0.00 (+0.00)
GET get_purl_details[b00df2ca-df21-5…874-304e9c54e2bd] 10 (0) 0 615.90 (+15.40) 200 (-11) 1085 (-123) 0.03 (+0.00) 0.00 (+0.00)
GET get_sbom[sha256:720e4451…a939656247164447] 15 (0) 0 1839.67 (+866.00) 417 (+167) 5802 (+3122) 0.05 (+0.00) 0.00 (+0.00)
GET get_sbom_advisories[sha256:87fd06bc…9d7b8304c0d2d9b2] 15 (0) 0 62187.27 (+3141.87) 50642 (+1129) 71212 (+3874) 0.05 (+0.00) 0.00 (+0.00)
GET get_sbom_license_ids[urn:uuid:019731…104-331632a21144] 10 (0) 0 8661.90 (+600.30) 6690 (+1336) 11502 (-2107) 0.03 (+0.00) 0.00 (+0.00)
GET list_advisory 10 (0) 0 914.50 (-239.10) 276 (-115) 1410 (-1503) 0.03 (+0.00) 0.00 (+0.00)
GET list_advisory_labels 15 (0) 0 14439.47 (-463.73) 11810 (+636) 19718 (-1998) 0.05 (+0.00) 0.00 (+0.00)
GET list_advisory_paginated 10 (0) 0 524.80 (-138.50) 288 (+22) 793 (-591) 0.03 (+0.00) 0.00 (+0.00)
GET list_importer 11 (0) 0 9.36 (+0.64) 1 (0) 70 (+18) 0.04 (+0.00) 0.00 (+0.00)
GET list_organizations 10 (0) 0 16.80 (-0.10) 1 (0) 49 (+1) 0.03 (+0.00) 0.00 (+0.00)
GET list_packages 11 (0) 0 382.00 (-99.55) 209 (-2) 523 (-331) 0.04 (+0.00) 0.00 (+0.00)
GET list_packages_paginated 11 (0) 0 372.00 (-44.27) 211 (-48) 516 (-174) 0.04 (+0.00) 0.00 (+0.00)
GET list_products 15 (0) 0 8.80 (-14.07) 5 (+2) 14 (-54) 0.05 (+0.00) 0.00 (+0.00)
GET list_sboms 15 (0) 0 1176.00 (+89.60) 521 (-81) 3190 (+334) 0.05 (+0.00) 0.00 (+0.00)
GET list_sboms_paginated 15 (0) 0 2396.47 (+926.47) 486 (+86) 5396 (+1981) 0.05 (+0.00) 0.00 (+0.00)
GET list_vulnerabilities 11 (0) 0 372.55 (+41.36) 82 (-39) 584 (+67) 0.04 (+0.00) 0.00 (+0.00)
GET list_vulnerabilities_paginated 11 (0) 0 210.09 (-78.27) 95 (-1) 299 (-117) 0.04 (+0.00) 0.00 (+0.00)
GET sbom_by_package[pkg:maven/io.qu…dhat.com%2fga%2f] 10 (0) 0 46.90 (-19.80) 6 (-2) 90 (-93) 0.03 (+0.00) 0.00 (+0.00)
GET search_advisory 10 (-1) 0 1399.10 (-406.63) 296 (-182) 2287 (-1011) 0.03 (-0.00) 0.00 (+0.00)
GET search_exact_purl 15 (0) 0 40.73 (+9.13) 4 (0) 73 (+3) 0.05 (+0.00) 0.00 (+0.00)
GET search_licenses 2 (+1) 0 78874.50 (-22017.50) 69876 (-31016) 87873 (-13019) 0.01 (+0.00) 0.00 (+0.00)
GET search_purls 15 (0) 0 24202.27 (+6793.40) 14210 (+1864) 30039 (+6872) 0.05 (+0.00) 0.00 (+0.00)
GET search_purls_by_license 1 (0) 0 143085.00 (-11010.00) 143085 (-11010) 143085 (-11010) 0.00 (+0.00) 0.00 (+0.00)
GET search_sboms_by_license 1 (0) 0 59704.00 (-9074.00) 59704 (-9074) 59704 (-9074) 0.00 (+0.00) 0.00 (+0.00)
POST get_recommendations[pkg:rpm/redhat/…[email protected]] 10 (0) 0 107.80 (+42.00) 8 (-1) 185 (+34) 0.03 (+0.00) 0.00 (+0.00)
POST post_vulnerability_analyze[pkg:rpm/redhat/…h=noarch&epoch=1] 10 (0) 0 377.10 (+35.50) 81 (-22) 734 (-194) 0.03 (+0.00) 0.00 (+0.00)
Aggregated 367 (0) 20 5819.20 (+543.36) 1 (0) 143085 (-11010) 1.22 (+0.00) 0.07 (+0.00)

Response Time Metrics

Method Name 50%ile (ms) 60%ile (ms) 70%ile (ms) 80%ile (ms) 90%ile (ms) 95%ile (ms) 99%ile (ms) 100%ile (ms)
DELETE delete_sbom_from_pool_sequential[100 SBOMs] 800 (-100) 900 (-100) 1,000 (0) 1,000 (0) 2,000 (0) 2,000 (0) 2,894 (+894) 2,894 (+894)
GET download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 6 (0) 6 (-2) 8 (-17) 11 (-14) 24 (-27) 28 (-24) 28 (-24) 28 (-24)
GET get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 3 (0) 5 (+2) 14 (+6) 18 (+10) 65 (+38) 106 (+47) 106 (+47) 106 (+47)
GET get_advisory_by_doc_id 10 (-2) 11 (-2) 18 (+2) 18 (-2) 55 (+5) 57 (0) 57 (0) 57 (0)
GET get_analysis_latest_cpe 280 (-20) 280 (-50) 290 (-100) 290 (-100) 320 (-356) 320 (-356) 440 (-236) 440 (-236)
GET get_analysis_status 5 (-1) 6 (0) 7 (-5) 7 (-6) 50 (-7) 50 (-7) 54 (-3) 54 (-3)
GET get_purl_details[b00df2ca-df21-5…874-304e9c54e2bd] 330 (-20) 900 (+300) 900 (+200) 900 (-100) 1,000 (0) 1,000 (0) 1,000 (0) 1,000 (0)
GET get_sbom[sha256:720e4451…a939656247164447] 1,000 (+400) 1,000 (0) 1,000 (0) 2,000 (+1,000) 4,000 (+2,000) 4,000 (+2,000) 5,802 (+3,122) 5,802 (+3,122)
GET get_sbom_advisories[sha256:87fd06bc…9d7b8304c0d2d9b2] 61,000 (+2,000) 63,000 (+4,000) 64,000 (-1,000) 67,000 (+2,000) 71,000 (+4,000) 71,000 (+4,000) 71,000 (+4,000) 71,000 (+4,000)
GET get_sbom_license_ids[urn:uuid:019731…104-331632a21144] 8,000 (+1,000) 8,000 (+1,000) 10,000 (+3,000) 10,000 (+3,000) 11,000 (-2,000) 11,502 (-2,107) 11,502 (-2,107) 11,502 (-2,107)
GET list_advisory 1,000 (+100) 1,000 (0) 1,000 (0) 1,000 (0) 1,000 (-1,913) 1,000 (-1,913) 1,000 (-1,913) 1,000 (-1,913)
GET list_advisory_labels 13,000 (-1,000) 13,000 (-1,000) 15,000 (-3,000) 16,000 (-2,000) 19,718 (-282) 19,718 (-282) 19,718 (-1,998) 19,718 (-1,998)
GET list_advisory_paginated 500 (-100) 500 (-100) 600 (0) 700 (-100) 700 (-300) 793 (-207) 793 (-207) 793 (-207)
GET list_importer 2 (-2) 5 (0) 5 (0) 5 (-1) 7 (-5) 7 (-5) 70 (+18) 70 (+18)
GET list_organizations 8 (+2) 9 (+2) 10 (-3) 41 (+3) 42 (-5) 49 (+1) 49 (+1) 49 (+1)
GET list_packages 400 (-100) 420 (-80) 500 (-100) 500 (-100) 500 (-100) 500 (-100) 500 (-354) 500 (-354)
GET list_packages_paginated 320 (-80) 420 (0) 470 (+40) 470 (-30) 480 (-120) 480 (-120) 500 (-190) 500 (-190)
GET list_products 8 (-4) 9 (-3) 9 (-5) 10 (-46) 12 (-54) 12 (-54) 14 (-54) 14 (-54)
GET list_sboms 700 (-100) 700 (-200) 1,000 (0) 1,000 (0) 3,000 (+144) 3,000 (+144) 3,000 (+144) 3,000 (+144)
GET list_sboms_paginated 2,000 (+1,000) 2,000 (+1,000) 3,000 (+1,000) 3,000 (+1,000) 5,000 (+3,000) 5,000 (+3,000) 5,000 (+2,000) 5,000 (+2,000)
GET list_vulnerabilities 584 (+174) 584 (+174) 584 (+174) 584 (+104) 584 (+84) 584 (+84) 584 (+84) 584 (+84)
GET list_vulnerabilities_paginated 270 (-20) 280 (-130) 280 (-130) 299 (-111) 299 (-111) 299 (-111) 299 (-117) 299 (-117)
GET sbom_by_package[pkg:maven/io.qu…dhat.com%2fga%2f] 52 (+27) 54 (+3) 55 (-8) 58 (-72) 80 (-90) 90 (-90) 90 (-90) 90 (-90)
GET search_advisory 1,000 (-2,000) 1,000 (-2,000) 2,000 (-1,000) 2,000 (-1,000) 2,000 (-1,000) 2,000 (-1,000) 2,000 (-1,000) 2,000 (-1,000)
GET search_exact_purl 42 (-2) 42 (-3) 70 (+24) 71 (+25) 73 (+14) 73 (+14) 73 (+3) 73 (+3)
GET search_licenses 70,000 (-30,892) 70,000 (-30,892) 70,000 (-30,892) 87,873 (-13,019) 87,873 (-13,019) 87,873 (-13,019) 87,873 (-13,019) 87,873 (-13,019)
GET search_purls 25,000 (+10,000) 25,000 (+9,000) 29,000 (+6,000) 29,000 (+6,000) 30,000 (+7,000) 30,000 (+7,000) 30,000 (+7,000) 30,000 (+7,000)
GET search_purls_by_license 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010) 143,085 (-11,010)
GET search_sboms_by_license 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074) 59,704 (-9,074)
POST get_recommendations[pkg:rpm/redhat/…[email protected]] 90 (+35) 180 (+111) 180 (+83) 180 (+70) 180 (+60) 185 (+35) 185 (+35) 185 (+35)
POST post_vulnerability_analyze[pkg:rpm/redhat/…h=noarch&epoch=1] 390 (+250) 410 (+210) 410 (+90) 500 (-200) 700 (0) 700 (-200) 700 (-200) 700 (-200)
Aggregated 400 (-40) 600 (0) 1,000 (0) 2,000 (0) 15,000 (+1,000) 51,000 (+28,000) 70,000 (+3,000) 143,000 (-11,000)

Status Code Metrics

Method Name Status Codes
DELETE delete_sbom_from_pool_sequential[100 SBOMs] 38 [200]
GET download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 [404]
GET get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 [404]
GET get_advisory_by_doc_id 10 [200]
GET get_analysis_latest_cpe 15 [200]
GET get_analysis_status 15 [200]
GET get_purl_details[b00df2ca-df21-5…874-304e9c54e2bd] 10 [200]
GET get_sbom[sha256:720e4451…a939656247164447] 15 [200]
GET get_sbom_advisories[sha256:87fd06bc…9d7b8304c0d2d9b2] 15 [200]
GET get_sbom_license_ids[urn:uuid:019731…104-331632a21144] 10 [200]
GET list_advisory 10 [200]
GET list_advisory_labels 15 [200]
GET list_advisory_paginated 10 [200]
GET list_importer 11 [200]
GET list_organizations 10 [200]
GET list_packages 11 [200]
GET list_packages_paginated 11 [200]
GET list_products 15 [200]
GET list_sboms 15 [200]
GET list_sboms_paginated 15 [200]
GET list_vulnerabilities 11 [200]
GET list_vulnerabilities_paginated 11 [200]
GET sbom_by_package[pkg:maven/io.qu…dhat.com%2fga%2f] 10 [200]
GET search_advisory 10 [200]
GET search_exact_purl 15 [200]
GET search_licenses 2 [200]
GET search_purls 15 [200]
GET search_purls_by_license 1 [200]
GET search_sboms_by_license 1 [200]
POST get_recommendations[pkg:rpm/redhat/…[email protected]] 10 [200]
POST post_vulnerability_analyze[pkg:rpm/redhat/…h=noarch&epoch=1] 10 [200]
Aggregated 20 [404], 347 [200]

Transaction Metrics

Transaction # Times Run # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
WebsiteUser
0.0 logon 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.1 website_index 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.2 website_openapi 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.3 website_sboms 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.4 website_packages 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.5 website_advisories 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
0.6 website_importers 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
RestAPIUser
1.0 logon 10 (0) 0 (0) 13.60 (+0.40) 11 (+3) 19 (0) 0.03 (+0.00) 0.00 (+0.00)
1.1 list_organizations 10 (0) 0 (0) 16.90 (+0.00) 1 (0) 49 (+1) 0.03 (+0.00) 0.00 (+0.00)
1.2 list_advisory 10 (0) 0 (0) 914.60 (-239.10) 276 (-115) 1411 (-1502) 0.03 (+0.00) 0.00 (+0.00)
1.3 list_advisory_paginated 10 (0) 0 (0) 524.80 (-138.50) 288 (+22) 793 (-591) 0.03 (+0.00) 0.00 (+0.00)
1.4 get_advisory_by_doc_id 10 (0) 0 (0) 19.20 (-0.70) 4 (0) 57 (0) 0.03 (+0.00) 0.00 (+0.00)
1.5 search_advisory 10 (-1) 0 (0) 1399.20 (-406.71) 296 (-182) 2287 (-1011) 0.03 (-0.00) 0.00 (+0.00)
1.6 list_vulnerabilities 11 (0) 0 (0) 372.55 (+41.36) 82 (-39) 584 (+67) 0.04 (+0.00) 0.00 (+0.00)
1.7 list_vulnerabilities_paginated 11 (0) 0 (0) 210.18 (-78.18) 95 (-1) 299 (-117) 0.04 (+0.00) 0.00 (+0.00)
1.8 list_importer 11 (0) 0 (0) 9.36 (+0.64) 1 (0) 70 (+18) 0.04 (+0.00) 0.00 (+0.00)
1.9 list_packages 11 (0) 0 (0) 382.00 (-99.73) 209 (-2) 523 (-331) 0.04 (+0.00) 0.00 (+0.00)
1.10 list_packages_paginated 11 (0) 0 (0) 372.00 (-44.27) 211 (-48) 516 (-174) 0.04 (+0.00) 0.00 (+0.00)
1.11 search_purls 15 (0) 0 (0) 24202.33 (+6793.40) 14210 (+1864) 30039 (+6872) 0.05 (+0.00) 0.00 (+0.00)
1.12 search_exact_purl 15 (0) 0 (0) 40.80 (+9.13) 4 (0) 73 (+3) 0.05 (+0.00) 0.00 (+0.00)
1.13 list_products 15 (0) 0 (0) 8.80 (-14.13) 5 (+2) 14 (-54) 0.05 (+0.00) 0.00 (+0.00)
1.14 list_sboms 15 (0) 0 (0) 1176.00 (+89.53) 521 (-81) 3190 (+334) 0.05 (+0.00) 0.00 (+0.00)
1.15 list_sboms_paginated 15 (0) 0 (0) 2396.60 (+926.53) 486 (+86) 5396 (+1981) 0.05 (+0.00) 0.00 (+0.00)
1.16 get_analysis_status 15 (0) 0 (0) 13.80 (-1.80) 3 (+2) 54 (-3) 0.05 (+0.00) 0.00 (+0.00)
1.17 get_analysis_latest_cpe 15 (0) 0 (0) 274.07 (-65.80) 144 (-56) 442 (-234) 0.05 (+0.00) 0.00 (+0.00)
1.18 list_advisory_labels 15 (0) 0 (0) 14439.47 (-463.73) 11810 (+636) 19718 (-1998) 0.05 (+0.00) 0.00 (+0.00)
1.19 get_sbom[sha256:720e4451…a939656247164447] 15 (0) 0 (0) 1839.67 (+865.93) 417 (+167) 5802 (+3122) 0.05 (+0.00) 0.00 (+0.00)
1.20 get_sbom_advisories[sha256:87fd06bc…9d7b8304c0d2d9b2] 15 (0) 0 (0) 62187.33 (+3141.93) 50642 (+1129) 71212 (+3874) 0.05 (+0.00) 0.00 (+0.00)
1.21 sbom_by_package[pkg:maven/io.qu…dhat.com%2fga%2f] 10 (0) 0 (0) 47.10 (-19.60) 7 (-1) 90 (-93) 0.03 (+0.00) 0.00 (+0.00)
1.22 get_sbom_license_ids[urn:uuid:019731…104-331632a21144] 10 (0) 0 (0) 8662.00 (+600.40) 6690 (+1336) 11502 (-2107) 0.03 (+0.00) 0.00 (+0.00)
1.23 post_vulnerability_analyze[pkg:rpm/redhat/…h=noarch&epoch=1] 10 (0) 0 (0) 377.20 (+35.60) 81 (-22) 734 (-194) 0.03 (+0.00) 0.00 (+0.00)
1.24 get_purl_details[b00df2ca-df21-5…874-304e9c54e2bd] 10 (0) 0 (0) 616.00 (+15.20) 200 (-11) 1086 (-122) 0.03 (+0.00) 0.00 (+0.00)
1.25 get_recommendations[pkg:rpm/redhat/…[email protected]] 10 (0) 0 (0) 107.90 (+42.00) 8 (-1) 186 (+35) 0.03 (+0.00) 0.00 (+0.00)
1.26 download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 0 (0) 9.60 (-8.40) 2 (0) 28 (-24) 0.03 (+0.00) 0.00 (+0.00)
1.27 get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 0 (0) 21.90 (+10.50) 1 (0) 107 (+48) 0.03 (+0.00) 0.00 (+0.00)
RestAPIUserSlow
2.0 logon 1 (+1) 0 (0) 17.00 (+17.00) 17 (+17) 17 (+17) 0.00 (+0.00) 0.00 (+0.00)
2.1 search_licenses 2 (+1) 0 (0) 78874.50 (-22017.50) 69876 (-31016) 87873 (-13019) 0.01 (+0.00) 0.00 (+0.00)
2.2 search_sboms_by_license 1 (0) 0 (0) 59705.00 (-9074.00) 59705 (-9074) 59705 (-9074) 0.00 (+0.00) 0.00 (+0.00)
2.3 search_purls_by_license 1 (0) 0 (0) 143085.00 (-11010.00) 143085 (-11010) 143085 (-11010) 0.00 (+0.00) 0.00 (+0.00)
RestAPIUserDelete
3.0 logon 38 (0) 0 (0) 10.29 (-0.50) 6 (0) 17 (-1) 0.13 (+0.00) 0.00 (+0.00)
3.1 delete_sbom_from_pool_sequential[100 SBOMs] 38 (0) 0 (0) 907.45 (-44.71) 73 (-20) 2894 (+682) 0.13 (+0.00) 0.00 (+0.00)
Aggregated 416 (+1) 0 (0) 5133.77 (+468.14) 1 (0) 143085 (-11010) 1.39 (+0.00) 0.00 (+0.00)

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
WebsiteUser 0 (0) 0 (0) 0.00 (+0.00) 0 (0) 0 (0) 0.00 (+0.00) 0.00 (+0.00)
RestAPIUser 5 (0) 10 (0) 121555.10 (+16085.70) 110780 (+10798) 134928 (+22610) 0.03 (+0.00) 2.00 (+0.00)
RestAPIUserSlow 1 (+1) 1 (+1) 272677.00 (+272677.00) 272677 (+272677) 272677 (+272677) 0.00 (+0.00) 1.00 (+1.00)
RestAPIUserDelete 1 (0) 38 (0) 7971.68 (+64.08) 6394 (-248) 9971 (+690) 0.13 (+0.00) 38.00 (+0.00)
Aggregated 7 (+1) 49 (+1) 36554.12 (+8321.14) 6394 (-248) 272677 (+160359) 0.16 (+0.00) 41.00 (+1.00)

Error Metrics

Method Name # Error
GET download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 404 Not Found: download_advisory[24ae57c3-4b57-4…2c1-83ae26059a89]
GET get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89] 10 (0) 404 Not Found: get_advisory[24ae57c3-4b57-4…2c1-83ae26059a89]

📄 Full Report (Go to "Artifacts" and download report)

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.

1 participant