Skip to content

fix: correct field name mismatch in performance test counters (#7860)#7867

Open
Cypher-CP0 wants to merge 2 commits into
layer5io:masterfrom
Cypher-CP0:fix/performance-counter-field-name
Open

fix: correct field name mismatch in performance test counters (#7860)#7867
Cypher-CP0 wants to merge 2 commits into
layer5io:masterfrom
Cypher-CP0:fix/performance-counter-field-name

Conversation

@Cypher-CP0

Copy link
Copy Markdown
Contributor

Description
This PR fixes #7860

The performance test run counters on the site (Meshery page, Nighthawk page)
were always displaying 0 instead of the real run count.

Root cause: the API at https://cloud.layer5.io/api/performance/results/total
returns {"totalRuns": 160375}, but four components were reading
result.total_runs (snake_case) instead of result.totalRuns (camelCase).
Since that field doesn't exist on the response, the value was always
undefined, so the counter fell back to its initial state of 0.

Changes made:

  • src/sections/Counters/index.js — fixed field name; added .catch() for
    error logging instead of failing silently.
  • src/sections/Meshery/How-meshery-works/specs/data-card.js — fixed field
    name; this is the component actually rendered on
    /cloud-native-management/meshery, the page referenced in the issue.
  • src/sections/Projects/Nighthawk/index.js — fixed field name; rendered on
    /projects/nighthawk, which has the same counter bug.
  • src/sections/Meshery/Features-Col/index.js — fixed field name in the
    FeaturesTable component (also rendered on the Meshery page); also
    changed console.log to console.error in the existing .catch() for
    consistency with error-logging conventions used elsewhere in the codebase.

Local testing note: the API only allows CORS requests from the production
origin (layer5.io), so this can't be fully verified from localhost — it
will show a CORS error there regardless of the fix. Verified via the API's
actual response shape and will confirm final behavior on the PR preview
deployment.

Notes for Reviewers
None - straightforward field-name fix, no schema/API changes needed on our side.

Signed commits

  • Yes, I signed my commits.

…tal_runs)

Signed-off-by: Cypher-CP0 <prabhatu4559@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://layer5.io/pr-preview/pr-7867/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

@KatalKavya96 KatalKavya96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Cypher-CP0 The changes look good. Could you please add a short screen recording from the PR preview showing the performance test counter displaying the correct value on the affected page?

rishiraj38
rishiraj38 previously approved these changes Jul 14, 2026
@rishiraj38
rishiraj38 self-requested a review July 14, 2026 19:04

@rishiraj38 rishiraj38 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are too many lint-only changes, which makes it hard to review the actual code changes. Please revert the lint changes.

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.

Inaccurate: "0" performance tests results being reported

4 participants