hydrogen debug cpucommand
Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to debug slow app startup times that cause failed deployments in Oxygen.
The profiling results are written to a .cpuprofile
file that can be viewed with certain tools such as Flame Chart Visualizer for Visual Studio Code.
Anchor to flagsFlags
The following flags are available for the hydrogen debug cpu
command:
- Anchor to --entry <value>--entry <value>stringenv: SHOPIFY_HYDROGEN_FLAG_ENTRY
Entry file for the worker. Defaults to
./server
.- Anchor to --output <value>--output <value>string
Specify a path to generate the profile file. Defaults to "startup.cpuprofile".
- Anchor to --path <value>--path <value>stringenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
hydrogendebugcpu
- --entry <value>
Entry file for the worker. Defaults to `./server`.
string
- --output <value>
Specify a path to generate the profile file. Defaults to "startup.cpuprofile".
string
- --path <value>
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
string
export interface hydrogendebugcpu {
/**
* Entry file for the worker. Defaults to `./server`.
* @environment SHOPIFY_HYDROGEN_FLAG_ENTRY
*/
'--entry <value>'?: string
/**
* Specify a path to generate the profile file. Defaults to "startup.cpuprofile".
*
*/
'--output <value>'?: string
/**
* The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
* @environment SHOPIFY_HYDROGEN_FLAG_PATH
*/
'--path <value>'?: string
}
Hydrogen debug cpu
examples
hydrogen debug cpu
hydrogen debug cpu
shopify hydrogen debug cpu [flags]