Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

chore: Change TTFB chart tick from day to month#30

Merged
pyropy merged 2 commits intomainfrom
chore/change-ttfb-chart-tick-rate
Mar 6, 2025
Merged

chore: Change TTFB chart tick from day to month#30
pyropy merged 2 commits intomainfrom
chore/change-ttfb-chart-tick-rate

Conversation

@pyropy
Copy link
Member

@pyropy pyropy commented Mar 3, 2025

With the introduction of the TTFB stat, we initially set the Spark TTFB chart to display data by day due to the limited dataset. Now that we've gathered a substantial amount of data, the charts are starting to look like this:

Screenshot 2025-03-03 at 14 57 47

This PR changes chart tick back from day to month making charts look like this in return:

Screenshot 2025-03-03 at 15 01 50

@pyropy pyropy requested a review from bajtos March 3, 2025 14:00
@pyropy pyropy self-assigned this Mar 3, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 3, 2025

Deploying spark-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b3c1cd
Status: ✅  Deploy successful!
Preview URL: https://f38298f8.spark-dashboard.pages.dev
Branch Preview URL: https://chore-change-ttfb-chart-tick.spark-dashboard.pages.dev

View logs

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Great idea! 👏

Please fix the CI build before landing.

@pyropy
Copy link
Member Author

pyropy commented Mar 3, 2025

Great idea! 👏

Please fix the CI build before landing.

I've taken a look at the logs and it looks like our miner summary is too large for Cloudflare pages to handle.

15:21:09.493 | ✘ [ERROR] Error: Pages only supports files up to 25 MiB in size
15:21:09.494 | _file/data/spark-miner-rsr-summaries.d776a422.json is 27.3 MiB in size

We're currently fetching miner RSR summary for past 31 days. Maybe reducing it to last week wound be more appropriate?

import { jsonFetcher } from './json-fetcher.js'
import { getDateXDaysAgo } from '../utils/date-utils.js'

const from = getDateXDaysAgo(7)
const to = getDateXDaysAgo(1)

const output = await jsonFetcher(
  `https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${from}&to=${to}`,
)
process.stdout.write(JSON.stringify(output))

@NikolasHaimerl
Copy link
Contributor

Great idea! 👏
Please fix the CI build before landing.

I've taken a look at the logs and it looks like our miner summary is too large for Cloudflare pages to handle.

15:21:09.493 | ✘ [ERROR] Error: Pages only supports files up to 25 MiB in size
15:21:09.494 | _file/data/spark-miner-rsr-summaries.d776a422.json is 27.3 MiB in size

We're currently fetching miner RSR summary for past 31 days. Maybe reducing it to last week wound be more appropriate?

import { jsonFetcher } from './json-fetcher.js'
import { getDateXDaysAgo } from '../utils/date-utils.js'

const from = getDateXDaysAgo(7)
const to = getDateXDaysAgo(1)

const output = await jsonFetcher(
  `https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${from}&to=${to}`,
)
process.stdout.write(JSON.stringify(output))

Is it possible to increase the supported size from 25MB to for example 50MB?

@pyropy
Copy link
Member Author

pyropy commented Mar 4, 2025

Great idea! 👏
Please fix the CI build before landing.

I've taken a look at the logs and it looks like our miner summary is too large for Cloudflare pages to handle.

15:21:09.493 | ✘ [ERROR] Error: Pages only supports files up to 25 MiB in size
15:21:09.494 | _file/data/spark-miner-rsr-summaries.d776a422.json is 27.3 MiB in size

We're currently fetching miner RSR summary for past 31 days. Maybe reducing it to last week wound be more appropriate?

import { jsonFetcher } from './json-fetcher.js'
import { getDateXDaysAgo } from '../utils/date-utils.js'

const from = getDateXDaysAgo(7)
const to = getDateXDaysAgo(1)

const output = await jsonFetcher(
  `https://stats.filspark.com/miners/retrieval-success-rate/summary?from=${from}&to=${to}`,
)
process.stdout.write(JSON.stringify(output))

Is it possible to increase the supported size from 25MB to for example 50MB?

Looking at their docs we can't increase the max size, but we could upload assets and serve them using R2 bucket.

@pyropy pyropy merged commit 2372710 into main Mar 6, 2025
3 checks passed
@pyropy pyropy deleted the chore/change-ttfb-chart-tick-rate branch March 6, 2025 12:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants