Skip to content

Commit

Permalink
Address Dashboard feedback (#17)
Browse files Browse the repository at this point in the history
* docs: update service class conformance details and enhance metrics in storage provider data

- Added new metrics for "days meeting both SLOS" and "proportion days meeting both SLOS" in the storage providers data.
- Updated the "Cold" Service Class conformance section with improved formatting and clearer definitions.
- Enhanced the CSV data extraction scripts to include additional metrics for better analysis.
- Minor formatting adjustments in the index documentation for clarity.

* Centering table column headers.

* fix: added proportion_days_meet_both_slos back to table

* Update src/data/daily_providers_metrics.csv.sh

Co-authored-by: Steve Loeppky <[email protected]>

* Update src/data/daily_providers_metrics.csv.sh

Co-authored-by: Steve Loeppky <[email protected]>

* Update src/index.md

Co-authored-by: Steve Loeppky <[email protected]>

* Update src/index.md

Co-authored-by: Steve Loeppky <[email protected]>

* fix: update SLI references to SLO in index.md

---------

Co-authored-by: Steve Loeppky <[email protected]>
Co-authored-by: Steve Loeppky <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2024
1 parent 46d8504 commit 073f4d6
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/data/daily_providers_metrics.csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ COPY (
select
date,
count(distinct provider_id) filter (where spark_retrieval_success_rate > 0.90) as meet_retrieval_sli,
count(distinct provider_id) filter (where sector_health_rate between 0.95 and 1.00) as meet_sector_health_sli,
count(distinct provider_id) filter (where spark_retrieval_success_rate >= 0.90) as meet_retrieval_slo,
count(distinct provider_id) filter (where sector_health_rate between 0.95 and 1.00) as meet_sector_health_slo,
from base
group by date
order by date desc
Expand Down
34 changes: 30 additions & 4 deletions src/data/storage_providers.csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,29 @@
duckdb :memory: << EOF
SET enable_progress_bar = false;
COPY (
with daily_sp_metrics_base as (
select
date,
provider_id,
spark_retrieval_success_rate,
sector_health_rate,
from read_parquet('https://data.filecoindataportal.xyz/filecoin_daily_storage_providers_metrics.parquet')
where date >= current_date() - interval '90 days'
),
daily_sp_metrics as (
select
provider_id,
count(date) filter (where spark_retrieval_success_rate > 0.90) as days_meet_retrieval_slo,
count(date) filter (where sector_health_rate between 0.95 and 1.00) as days_meet_sector_health_slo,
count(date) filter (where spark_retrieval_success_rate > 0.90 and sector_health_rate between 0.95 and 1.00) as days_meet_both_slos,
round(cast(count(date) filter (where spark_retrieval_success_rate > 0.90 and sector_health_rate between 0.95 and 1.00) as double) / count(date), 3) as proportion_days_meet_both_slos
from daily_sp_metrics_base
group by provider_id
)
SELECT
provider_id,
sp.provider_id,
total_active_deals,
total_active_data_uploaded_tibs,
total_active_unique_clients,
Expand All @@ -16,8 +37,13 @@ COPY (
initial_pledge,
locked_funds,
provider_collateral,
capacity_utilization_ratio
FROM read_parquet('https://data.filecoindataportal.xyz/filecoin_storage_providers.parquet')
WHERE total_active_deals > 0
capacity_utilization_ratio,
days_meet_retrieval_slo,
days_meet_sector_health_slo,
days_meet_both_slos,
proportion_days_meet_both_slos
FROM read_parquet('https://data.filecoindataportal.xyz/filecoin_storage_providers.parquet') as sp
left join daily_sp_metrics as dsp on sp.provider_id = dsp.provider_id
WHERE sp.total_active_deals > 0
) TO STDOUT (FORMAT 'CSV');
EOF
78 changes: 46 additions & 32 deletions src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ These are aggregate views looking at all Storage Providers on the network.
```

</div>

</div>


Expand Down Expand Up @@ -148,14 +149,15 @@ Service Classes and their corresponding Service Level Objectives are defined in
Plot.ruleY([0]),
Plot.lineY(daily_providers_metrics, {
x: "date",
y: "meet_retrieval_sli",
y: "meet_retrieval_slo",
tip: true,
})
]
})))
```

</div>

<div class="card">

```js
Expand All @@ -172,50 +174,51 @@ Service Classes and their corresponding Service Level Objectives are defined in
Plot.ruleY([0]),
Plot.lineY(daily_providers_metrics, {
x: "date",
y: "meet_sector_health_sli",
y: "meet_sector_health_slo",
tip: true,
})
]
})))
```

</div>
</div>

#### "Cold" Service Class Conformance

[📚 "Cold" Service Class README](https://github.com/filecoin-project/service-classes/blob/main/service-classes/cold.md).

</div>
<div class="card">

```js
resize((width) => Plot.plot(addPlotCaption({
title: "\"Cold\" Service Class Conformance",
subtitle: "Providers conforming to archive SLO standards",
x: { label: "Date" },
y: {
grid: true,
label: "Conformance (%)",
domain: [0, 100]
},
width,
marks: [
Plot.ruleY([0]),
Plot.ruleY([80]),
Plot.text(
["To be implemented"],
{
x: 0,
y: 40,
fontSize: 48,
fill: "var(--theme-foreground-faint)"
}
)
]
})))
```
<div class="card">

</div>
```js
resize((width) => Plot.plot(addPlotCaption({
title: "\"Cold\" Service Class Conformance",
subtitle: "Providers conforming to archive SLO standards",
x: { label: "Date" },
y: {
grid: true,
label: "Conformance (%)",
domain: [0, 100]
},
width,
marks: [
Plot.ruleY([0]),
Plot.ruleY([80]),
Plot.text(
["To be implemented"],
{
x: 0,
y: 40,
fontSize: 48,
fill: "var(--theme-foreground-faint)"
}
)
]
})))
```

</div>

## Storage Providers List

Expand All @@ -225,10 +228,16 @@ The table below lists metrics for Filecoin Storage Providers. More metrics incl
const storage_providers = FileAttachment("data/storage_providers.csv").csv({typed: true});
```

<div id="storage-providers-table">

```js
Inputs.table(storage_providers, {
columns: [
"provider_id",
"days_meet_both_slos",
"proportion_days_meet_both_slos",
"days_meet_retrieval_slo",
"days_meet_sector_health_slo",
"total_active_deals",
"total_active_data_uploaded_tibs",
"total_active_unique_clients",
Expand All @@ -244,6 +253,10 @@ Inputs.table(storage_providers, {
],
header: {
provider_id: "Provider ID",
days_meet_both_slos: "Days Meeting Both SLOs",
proportion_days_meet_both_slos: "Proportion Days Meeting Both SLOs",
days_meet_retrieval_slo: "Days Meeting Retrieval SLO",
days_meet_sector_health_slo: "Days Meeting Sector Health SLO",
total_active_deals: "Active Deals",
total_active_data_uploaded_tibs: "Active Data Uploaded (TiB)",
total_active_unique_clients: "Active Unique Clients",
Expand All @@ -257,7 +270,7 @@ Inputs.table(storage_providers, {
provider_collateral: "Provider Collateral",
capacity_utilization_ratio: "Capacity Utilization Ratio"
},
sort: "total_active_deals",
sort: "proportion_days_meet_both_slos",
reverse: true,
rows: 20,
select: false,
Expand All @@ -266,3 +279,4 @@ Inputs.table(storage_providers, {
}
})
```
</div>
8 changes: 8 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
p,
table,
figure,
ul,
figcaption,
h1,
h2,
Expand All @@ -18,3 +19,10 @@ h5,
h6 {
max-width: none;
}

/* This level of specificity was needed to override default Observable styles.
This allows us not to specify each column that we want to center. */
div#storage-providers-table .observablehq th {
text-align: center;
white-space: break-spaces;
}

0 comments on commit 073f4d6

Please sign in to comment.