npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thesight/profiler

v0.1.1

Published

Sight CLI — profile any Solana transaction. Shows CPI tree, per-program compute-unit attribution, full cost-model breakdown (signature, write-locks, data bytes, programs execution, loaded accounts), and decoded Anchor errors. Installs a `sight` binary.

Readme

@thesight/profiler

The sight CLI — profile any Solana transaction from a signature or a simulation, get the full picture of where every compute unit went and what the transaction actually cost.

Part of Sight, the OpenTelemetry observability layer for Solana. The CLI is standalone — you don't need a Sight account, a DSN, or an ingest endpoint to use it. Point it at any RPC and a signature you care about.

Install

npm i -g @thesight/profiler
# or run without installing:
npx @thesight/profiler profile <signature>

What it shows

$ sight profile 5kdJgZ…DpQsRA
  Using mainnet.helius-rpc.com (from $HELIUS_RPC_URL).
  ✔ Profiled — 181,584 CU total (178,420 execution)

  Cost Model
  Sight-computed breakdown — simulate() alone only returns "Programs execution"

  ██░░░░░░░░░░░░░░░░░░░░░░░░░       720 CU   0.4%  Signature
  ██░░░░░░░░░░░░░░░░░░░░░░░░░     2,400 CU   1.3%  Write locks
  ░░░░░░░░░░░░░░░░░░░░░░░░░░░        12 CU   0.0%  Data bytes
  █████████████████████████░░   178,420 CU  98.3%  Programs execution
  ░░░░░░░░░░░░░░░░░░░░░░░░░░░         — CU          Loaded accounts size (use --full)
  ───────────────────────────
                                181,584 CU  Total (excl. loaded-accounts)

  Sight — CU Profile
  5kdJgZ…DpQsRA
  Slot 326,184,592

  ███████████████████████████ 89.2% of budget
  178,420 / 200,000 CU

    █ 178,420 CU 100.0%  jupiter_v6::route
      █  92,140 CU  51.6%  whirlpool::swap
        ▌  4,645 CU   2.6%  token_program::TransferChecked
        ▌  4,645 CU   2.6%  token_program::TransferChecked
      █  61,890 CU  34.7%  orca_v2::swap
        ▌  4,645 CU   2.6%  token_program::TransferChecked
        ▌  4,645 CU   2.6%  token_program::TransferChecked
      ▏     300 CU   0.2%  compute_budget::SetComputeUnitLimit

Commands

sight profile <signature>

Profile a confirmed transaction. Fetches it via getTransaction, parses the on-chain logs into a CPI tree, and renders the flamegraph plus the cost-model breakdown.

sight profile 5kdJgZ…DpQsRA                    # happy path
sight profile <sig> --full                     # include loaded-accounts cost (extra RPC)
sight profile <sig> --no-idl                   # skip on-chain IDL lookup
sight profile <sig> --json                     # machine-readable output
sight profile <sig> --rpc https://your-rpc.io  # override RPC endpoint

sight simulate

Pipe a base64-encoded transaction to simulate it without sending and profile the result. Default target cluster is devnet.

cat tx.b64 | sight simulate
cat tx.b64 | sight simulate --rpc https://api.mainnet-beta.solana.com

RPC configuration

The CLI picks up an RPC endpoint from (in order):

  1. --rpc <url> flag
  2. $HELIUS_RPC_URL env var
  3. $RPC_URL
  4. $SOLANA_RPC_URL
  5. Public mainnet (rate-limited — you'll hit 429s quickly)
export HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=<your-key>
sight profile <sig>

What's the cost model?

Solana's cost model prices a transaction in five components, but the simulateTransaction RPC only returns unitsConsumed (the programs-execution cost). Sight computes the other four client-side from the transaction structure so you see the full picture before submission:

| Component | Source | |---|---| | signature_cost | 720 CU × signature count | | write_lock_cost | 300 CU × writable accounts (incl. ALT writables) | | data_bytes_cost | floor(total ix data bytes / 140) | | programs_execution_cost | RPC-reported unitsConsumed | | loaded_accounts_data_size_cost | 8 CU × ceil(loaded bytes / 32 KB) — opt-in via --full |

The --full flag adds one getMultipleAccounts round-trip to measure loaded-accounts size; everything else is derivable from the raw tx.

Related packages

  • @thesight/sdk — production OTel SDK that auto-attaches solana.cost.* span attributes on every transaction.
  • @thesight/core — the shared log parser, IDL resolver, and cost-model engine powering both the CLI and the SDK.

License

MIT