JupyterLab的UI性能分析扩展
项目描述
jupyterlab-ui-profiler
JupyterLab的UI性能分析扩展。
您可以在我们的用户指南中找到更多信息。
注意:当此扩展启用时,服务器将返回额外的标题
-
以允许Firefox 79+中高精度的
performance.now()
测量Cross-Origin-Opener-Policy: same-origin, Cross-Origin-Embedder-Policy: require-corp
-
以在Chrome中启用JavaScript自分析
Document-Policy: js-profiling
如果这不符合您的部署,但您仍想使用分析器而不使用这些功能,您可以禁用设置这些标题的服务器扩展,方法是在
jupyter server extension disable jupyterlab_ui_profiler
需求
- JupyterLab >= 3.0
安装
要安装扩展,请执行
pip install jupyterlab-ui-profiler
卸载
要删除扩展,请执行
pip uninstall jupyterlab-ui-profiler
贡献
开发安装
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab安装的yarn的固定版本。您可以使用yarn
或npm
代替下面的jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab-ui-profiler directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build
您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源的变化并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab
在运行监视命令时,每次保存的更改将立即在本地构建并可供您运行的 JupyterLab 使用。刷新 JupyterLab 以在浏览器中加载更改(您可能需要等待几秒钟,以便扩展重新构建)。
默认情况下,jlpm build
命令为该扩展生成源映射,以便使用浏览器开发者工具进行调试。要为 JupyterLab 核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
开发卸载
pip uninstall jupyterlab-ui-profiler
在开发模式下,还需要删除由 jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行 jupyter labextension list
以确定 labextensions
文件夹的位置。然后,您可以在该文件夹中删除名为 @jupyterlab/ui-profiler
的符号链接。
测试扩展
前端测试
此扩展使用 Jest 进行 JavaScript 代码测试。
要执行它们,请执行
jlpm
jlpm test
集成测试
此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更精确地说,使用 JupyterLab 辅助工具 Galata 来处理在 JupyterLab 中测试扩展。
更多详细信息请参阅 ui-tests 中的 README。
文档
本地构建
make -C docs/ html SPHINXOPTS="-W"
监视模式下构建
sphinx-autobuild docs/source docs/build/html
打包扩展
请参阅 RELEASE
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源分布
构建分布
jupyterlab_ui_profiler-0.2.2.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3cccc879269fb715dfaf4e1d0dcffbf825fc2c4a172cbaf89b49076b66cb4cdf |
|
MD5 | 71da05023213dcac8ffa6c44ea7e9e30 |
|
BLAKE2b-256 | f6ce80c10ff035ed15e96f23e25377ac83260248ecac6a8f5c4a18a583125d95 |
jupyterlab_ui_profiler-0.2.2-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 568af45f533eed532b994a213d4c3b69f9253a1ca17ad364bc60a5c1a505db34 |
|
MD5 | d2e625adae14fe632d1aef677461405e |
|
BLAKE2b-256 | 15edc2aa98afbc931b0f6522e95035e96810380b14af3b532858570de3fe4c58 |