The client to use. AvalancheCoreClient
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);
Start profiling the CPU utilization of the node. To stop, call
stopCPUProfiler
. On stop, writes the profile tocpu.profile
.