-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎨 update charts with new metrics
- Loading branch information
1 parent
6bbb4d7
commit 7a15044
Showing
7 changed files
with
201 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
#!/usr/bin/env bash | ||
|
||
duckdb :memory: << EOF | ||
SET enable_progress_bar = false; | ||
COPY ( | ||
with retrieval_rates as ( | ||
select | ||
date, | ||
provider_id, | ||
case | ||
when total_retrieval_requests > 0 | ||
then successful_retrieval_requests * 1.0 / total_retrieval_requests | ||
else 0 | ||
end as retrieval_rate, | ||
sector_health_rate, | ||
from read_parquet('https://data.filecoindataportal.xyz/filecoin_daily_storage_providers_metrics.parquet') | ||
where date >= current_date() - interval '90 days' | ||
) | ||
select | ||
date, | ||
count(distinct case when retrieval_rate > 0.9 then provider_id end) as meet_retrieval_sli, | ||
count(distinct case when retrieval_rate > 0.9 then provider_id end) * 1.0 / count(distinct provider_id) as meet_retrieval_sli_percent, | ||
count(distinct provider_id) filter (where sector_health_rate * 100 > 95) as meet_sector_health_sli, | ||
count(distinct provider_id) filter (where sector_health_rate * 100 > 95) * 1.0 / count(distinct provider_id) as meet_sector_health_sli_percent | ||
from retrieval_rates r | ||
group by date | ||
order by date desc | ||
) TO STDOUT (FORMAT 'CSV'); | ||
EOF |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@import url("observablehq:default.css"); | ||
@import url("observablehq:theme-parchment.css"); | ||
@import url("observablehq:theme-wide.css"); | ||
|
||
/* :root { | ||
--theme-foreground-focus: #008ffe; | ||
} */ | ||
|
||
p, | ||
table, | ||
figure, | ||
figcaption, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
max-width: none; | ||
} |