當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python distributed.performance_report用法及代碼示例

用法:

class distributed.performance_report(filename='dask-report.html', stacklevel=1, mode=None)

收集績效報告

這將創建一個靜態 HTML 文件,其中包含儀表板的許多相同圖以供以後查看。

生成的文件使用 JavaScript,因此必須使用 Web 瀏覽器查看。在本地,我們建議使用 python -m http.server 或在線托管文件。

參數

filename: str, optional

本地保存性能報告的文件名

stacklevel: int, optional

用於填充報告的調用代碼部分的代碼執行框架。默認為1,這是調用performance_report的框架

mode: str, optional

要傳遞給 bokeh.io.output.output_file() 的模式參數。默認為 None

例子

>>> with performance_report(filename="myfile.html", stacklevel=1):
...     x.compute()

$python -m http.server $打開 myfile.html

相關用法


注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 distributed.performance_report。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。