Skip to content

Commit

Permalink
refactor(explorer): remove bytes logging and include all possible err…
Browse files Browse the repository at this point in the history
…or logs
  • Loading branch information
telestrial committed Dec 17, 2024
1 parent 9addf6a commit cbcc6e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-apples-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'explorer': minor
---

Add host and block metrics error logging to home page.
5 changes: 5 additions & 0 deletions .changeset/silent-dolls-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'explorer': minor
---

Remove bytes logging from home page.
19 changes: 2 additions & 17 deletions apps/explorer/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Metadata } from 'next'
import { appLink, network } from '../config'
import { Home } from '../components/Home'
import { buildMetadata } from '../lib/utils'
import { humanBytes } from '@siafoundation/units'
import { getLatestBlocks } from '../lib/blocks'
import { siaCentral } from '../config/siaCentral'
import { to } from '@siafoundation/request'
Expand Down Expand Up @@ -60,25 +59,11 @@ export default async function HomePage() {
latestBlocksError,
exchangeRatesError,
hostsError,
hostMetricsError,
blockMetrics,
})
}

console.log(new Date().toISOString(), {
latestBlocks: humanBytes(
Buffer.byteLength(JSON.stringify(latestBlocks || ''))
),
exchangeRates: humanBytes(
Buffer.byteLength(JSON.stringify(exchangeRates || ''))
),
hosts: humanBytes(Buffer.byteLength(JSON.stringify(hosts || ''))),
hostMetrics: humanBytes(
Buffer.byteLength(JSON.stringify(hostMetrics || ''))
),
blockMetrics: humanBytes(
Buffer.byteLength(JSON.stringify(blockMetrics || ''))
),
})

return (
<Home
metrics={hostMetrics}
Expand Down

0 comments on commit cbcc6e6

Please sign in to comment.