layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

Inaccurate: "0" performance tests results being reported

Open leecalcote opened this issue 4 months ago β€’ 6 comments

Description

On this page, 0 is the number of performance tests being displayed, despite the fact that over 160,000 tests have been run.

Expected Behavior

The number of tests runs increases over time and should be dynamically retrieved (as they have previously been) from https://cloud.layer5.io/api/performance/results/total.

See https://github.com/layer5io/layer5/blob/master/src/sections/Counters/index.js. Debug, and ensure the number is once again displayed.

Screenshots

Image

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

leecalcote avatar Jul 10 '26 22:07 leecalcote

reply_target: layer5io/layer5#7860 The counter stays at 0 because of a property name mismatch in src/sections/Counters/index.js. The API at cloud.layer5.io/api/performance/results/total returns JSON in camelCase β€” {"totalRuns": 160375} β€” but the component reads result.total_runs (snake_case). JavaScript resolves the wrong key to undefined, and since the counter is initialised at useState(0), it sits there regardless of the API response.

Fix is changing result.total_runs to result.totalRuns on the relevant line.

molloyzak13 avatar Jul 11 '26 00:07 molloyzak13

Can i Resolve this issue, I have good JavaScript skills!

Sumedh-6504 avatar Jul 12 '26 04:07 Sumedh-6504

@leecalcote @KatalKavya96 I have linked a Pull request #7870 , Can you please Review it once?

Sumedh-6504 avatar Jul 20 '26 03:07 Sumedh-6504

@leecalcote @Sbragul26 can you assign this task to me. I have good experience with backend

FaizanCyber007 avatar Aug 06 '26 18:08 FaizanCyber007

@FaizanCyber007 Go ahead!!

KhushamBansal avatar Aug 06 '26 18:08 KhushamBansal

Hi @leecalcote, I'd like to work on this issue. I've read the CONTRIBUTING.md and plan to inspect src/sections/Counters/index.js, reproduce the issue locally, and debug the performance-results API integration to determine why the counter is displaying 0. If assigned, I'll submit a focused fix with appropriate testing.

ShivamDev19 avatar Aug 11 '26 12:08 ShivamDev19