vllm.utils.profiling ¶
   cprofile ¶
  Decorator to profile a Python method using cProfile.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 save_file  |   str | None  |    Path to save the profile result. If "1", None, or "", results will be printed to stdout.  |   None  |  
 enabled  |   bool  |    Set to false to turn this into a no-op  |   True  |  
Source code in vllm/utils/profiling.py
   cprofile_context ¶
 cprofile_context(save_file: str | None = None)
Run a cprofile
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 save_file  |   str | None  |    path to save the profile result. "1" or None will result in printing to stdout.  |   None  |