Avalanche SDK Client
    Preparing search index...

    Function startCPUProfiler

    • Start profiling the CPU utilization of the node. To stop, call stopCPUProfiler. On stop, writes the profile to cpu.profile.

      Type Parameters

      • chain extends undefined | Chain

      Parameters

      • client: { extend: <const client extends { [key: string]: unknown }>(fn: (client: { extend: ... }) => client) => { [K in (...) | (...) | (...)]: (...)[(...)] } }

        The client to use. AvalancheCoreClient

      Returns Promise<void>

      Promise that resolves when the profiler is started

      import { createAvalancheCoreClient} from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { startCPUProfiler } from '@avalanche-sdk/client/methods/admin'

      const client = createAvalancheCoreClient({
      chain: avalanche,
      transport: {
      type: "http",
      url: "<url>",
      },
      });

      await startCPUProfiler(client);