Initializes the config, and starts heap profiler if the heap profiler is needed. Returns a profiler if creation is successful. Otherwise, returns rejected promise.
Starts the profiling agent and returns a promise. If any error is encountered when configuring the profiler the promise will be rejected. Resolves when profiling is started.
config - Config describing configuration for profiling.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Package @google-cloud/profiler (5.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [5.0.3 (latest)](/nodejs/docs/reference/profiler/latest/overview)\n- [5.0.2](/nodejs/docs/reference/profiler/5.0.2/overview)\n- [4.1.5](/nodejs/docs/reference/profiler/4.1.5/overview) \n\nFunctions\n---------\n\n### createProfiler(config)\n\n export declare function createProfiler(config?: Config): Promise\n\nInitializes the config, and starts heap profiler if the heap profiler is needed. Returns a profiler if creation is successful. Otherwise, returns rejected promise. \n\n### nodeVersionOkay(version)\n\n export declare function nodeVersionOkay(version: string | semver.SemVer): boolean;\n\nReturns true if the version passed in satifised version requirements specified in the profiler's package.json.\n\nExported for testing. \n\n### start(config)\n\n export declare function start(config?: Config): Promise\n\nStarts the profiling agent and returns a promise. If any error is encountered when configuring the profiler the promise will be rejected. Resolves when profiling is started.\n\nconfig - Config describing configuration for profiling. \n\n#### Examples\n\nprofiler.start();\n\nprofiler.start(config);\n\n### startLocal(config)\n\n export declare function startLocal(config?: Config): Promise\n\nFor debugging purposes. Collects profiles and discards the collected profiles."]]