-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add http rsr #18
Conversation
Deploying spark-dashboard with Cloudflare Pages
|
@@ -60,7 +60,7 @@ const end = view(Inputs.date({label: "End", value: getDateXDaysAgo(1) })); | |||
resize((width) => Histogram(SparkMinerRates, { width, title: "Retrieval Success Rate Buckets", thresholds: 10 })) | |||
}</div> | |||
<div class="card">${ | |||
resize((width) => Histogram(nonZeroSparkMinerRates, { width, title: "Non-zero Miners: Retrieval Success Rate Buckets", thresholds: 10 })) | |||
resize((width) => Histogram(nonZeroSparkMinerRates.map((record) => ({success_rate: record.success_rate, success_rate_http: record.success_rate_http? record.success_rate_http: null})), { width, title: "Non-zero Miners: Retrieval Success Rate Buckets", thresholds: 10 })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want to count success_rate_http
of 0 or null for this histogram which is why we set all 0, undefined and null values of success_rate_http
to null. The histogram function then filters out all null values as those are not valid for plotting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're also filtering for values inside Histogram
. Do we need to filter values here too? Also in this case if value is 0
it will be assigned null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because the filter inside of Histogram
only filters for null values. For this specific chart we also do not want all 0
values, which is why we need to do the filtering before accesing Histogram
.
@@ -86,7 +88,7 @@ const percentiles = Object.entries(SparkMinerRsrSummaries) | |||
].map(above => ({ | |||
day: new Date(day), | |||
label: `> ${above * 100}%`, | |||
count: countAbove(miners.map(m => m.success_rate), above) | |||
count_succes_rate: countAbove(miners.map(m => m.success_rate), above), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For naming consistency I also renamed the success rate here.
src/components/line-graph.js
Outdated
})), | ||
...filteredEvents.map((event) => ({ | ||
day: event.day, | ||
success_rate_http: Number(event.success_rate_http), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success_rate_http
may be null and for consistency with past data as well as the graph Filecoin SPs with a non-zero Spark Retrieval Success Rate'
I set past null values to 0. This way the graphs are consistent in how they handle past data.
Lovely! 😍 The miner table still does not show the HTTP success rate in percent, PTAL again. On the per-miner page, it looks like we are showing only one line that's initially orange and later switches to blue, can you PTAL? See e.g. here: https://nhaimerl-add-http-rsr.spark-dashboard.pages.dev/provider/f03028412 |
I think this is because, the success rates are the same and thus overlay. See: https://30a5bd11.spark-dashboard.pages.dev/provider/f03201941 |
Makes sense 👍🏻 |
I also worked in the changs for the percentage value of the successful http rate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👏🏻
@juliangruber @pyropy: You may want to review this pull request, too; you are more familiar with this codebase than I am. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the observable parts lgtm, I trust @bajtos's review covered the spark parts
This PR proposes the following changes:
See Issue.