Full Code of gaogaotiantian/viztracer for AI

master ede823750456 cached
164 files
60.8 MB
7.5M tokens
9108 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (30,183K chars total). Download the full file to get everything.
Repository: gaogaotiantian/viztracer
Branch: master
Commit: ede823750456
Files: 164
Total size: 60.8 MB

Directory structure:
gitextract_o58d0in3/

├── .coveragerc
├── .gitattributes
├── .github/
│   ├── CONTRIBUTING.md
│   ├── FUNDING.yml
│   └── workflows/
│       ├── docs.yml
│       ├── lint.yml
│       ├── python-package.yml
│       ├── release.yml
│       └── wheels.yml
├── .gitignore
├── .readthedocs.yml
├── CITATION.cff
├── LICENSE
├── MANIFEST.in
├── Makefile
├── NOTICE.txt
├── README.md
├── docs/
│   ├── Makefile
│   ├── make.bat
│   ├── requirements.txt
│   └── source/
│       ├── basic_usage.rst
│       ├── concurrency.rst
│       ├── conf.py
│       ├── contact.rst
│       ├── custom_event.rst
│       ├── custom_event_intro.rst
│       ├── decorator.rst
│       ├── extra_log.rst
│       ├── filter.rst
│       ├── global_tracer.rst
│       ├── index.rst
│       ├── installation.rst
│       ├── license.rst
│       ├── limitations.rst
│       ├── plugins.rst
│       ├── remote_attach.rst
│       ├── sponsor.rst
│       ├── viz_plugin.rst
│       └── viztracer.rst
├── example/
│   ├── generate_examples.py
│   ├── json/
│   │   ├── async_simple.json
│   │   ├── different_sorts.json
│   │   ├── function_args_return.json
│   │   ├── gradient_descent.json
│   │   ├── logging_integration.json
│   │   ├── mcts_game.json
│   │   ├── multi_process_pool.json
│   │   └── multithread.json
│   ├── requirements.txt
│   └── src/
│       ├── async_simple.py
│       ├── different_sorts.py
│       ├── function_args_return.py
│       ├── gradient_descent.py
│       ├── logging_integration.py
│       ├── mcts_game.py
│       ├── multi_process_pool.py
│       └── multithread.py
├── pyproject.toml
├── requirements-dev.txt
├── setup.py
├── src/
│   └── viztracer/
│       ├── __init__.py
│       ├── __main__.py
│       ├── attach.py
│       ├── attach_process/
│       │   ├── LICENSE
│       │   ├── README.txt
│       │   ├── __init__.py
│       │   ├── add_code_to_python_process.py
│       │   └── linux_and_mac/
│       │       └── lldb_prepare.py
│       ├── cellmagic.py
│       ├── code_monkey.py
│       ├── decorator.py
│       ├── event_base.py
│       ├── functree.py
│       ├── html/
│       │   ├── LICENSE
│       │   ├── README.md
│       │   ├── flamegraph.html
│       │   ├── trace_viewer_embedder.html
│       │   └── trace_viewer_full.html
│       ├── main.py
│       ├── modules/
│       │   ├── eventnode.c
│       │   ├── eventnode.h
│       │   ├── pythoncapi_compat.h
│       │   ├── quicktime.c
│       │   ├── quicktime.h
│       │   ├── snaptrace.c
│       │   ├── snaptrace.h
│       │   ├── snaptrace_member.c
│       │   ├── util.c
│       │   ├── util.h
│       │   └── vcompressor/
│       │       ├── README.md
│       │       ├── vc_dump.c
│       │       ├── vc_dump.h
│       │       ├── vcompressor.c
│       │       └── vcompressor.h
│       ├── patch.py
│       ├── report_builder.py
│       ├── report_server.py
│       ├── snaptrace.pyi
│       ├── util.py
│       ├── vcompressor.pyi
│       ├── viewer.py
│       ├── vizcounter.py
│       ├── vizevent.py
│       ├── vizlogging.py
│       ├── vizobject.py
│       ├── vizplugin.py
│       ├── viztracer.py
│       └── web_dist/
│           ├── LICENSE
│           ├── index.html
│           ├── service_worker.js
│           ├── trace_processor
│           └── v52.0-6b9586def/
│               ├── assets/
│               │   ├── catapult_trace_viewer.html
│               │   └── catapult_trace_viewer.js
│               ├── engine_bundle.js
│               ├── frontend_bundle.js
│               ├── index.html
│               ├── manifest.json
│               ├── perfetto.css
│               ├── stdlib_docs.json
│               ├── trace_config_utils.wasm
│               ├── trace_processor.wasm
│               ├── trace_processor_memory64.wasm
│               ├── traceconv.wasm
│               └── traceconv_bundle.js
└── tests/
    ├── __init__.py
    ├── base_tmpl.py
    ├── cmdline_tmpl.py
    ├── data/
    │   ├── fib.py
    │   ├── vdb_basic.py
    │   └── vdb_multithread.py
    ├── modules/
    │   ├── __init__.py
    │   ├── dummy_vizplugin.py
    │   ├── dummy_vizplugin_wrong.py
    │   ├── issue160.py
    │   ├── issue58.py
    │   └── issue83.py
    ├── package_env.py
    ├── test_basic.py
    ├── test_cmdline.py
    ├── test_codemonkey.py
    ├── test_fastlog.py
    ├── test_functree.py
    ├── test_invalid.py
    ├── test_jupyter.py
    ├── test_logging.py
    ├── test_logsparse.py
    ├── test_multiprocess.py
    ├── test_multithread.py
    ├── test_patch.py
    ├── test_performance.py
    ├── test_regression.py
    ├── test_remote.py
    ├── test_report_builder.py
    ├── test_report_server.py
    ├── test_torch.py
    ├── test_tracer.py
    ├── test_util.py
    ├── test_vcompressor.py
    ├── test_viewer.py
    ├── test_vizcounter.py
    ├── test_vizevent.py
    ├── test_vizobject.py
    ├── test_vizplugin.py
    └── util.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .coveragerc
================================================
[run]
cover_pylib = True
source = viztracer
patch = subprocess
omit =
    */viztracer/attach_process/*


================================================
FILE: .gitattributes
================================================
src/viztracer/html/** linguist-vendored
example/json/* linguist-generated
src/viztracer/web_dist/** linguist-vendored
src/viztracer/attach_process/** linguist-vendored


================================================
FILE: .github/CONTRIBUTING.md
================================================

First of all, many thanks to everyone who wants to contribute to VizTracer!

## Before Writing Code

If you have any thoughts that involve more than a couple of lines of code, I highly recommend you to
submit an issue first talking about the stuff you want to implement. We should have a discussion about
whether we want to do it, before you put too much effort into it.

## Coding

### Implementation

VizTracer requires type annotation for functions. Please do a lint check described below before you
submit the code.

There's no exact coding standards VizTracer follows, just try to make the code readable.

### Tests

If you are implementing something new, you need to write tests for it. VizTracer is a 100% coverage
project. There might be lines that can't be covered, give yourself(and me) a good reason why, and
add ``pragma: no cover`` after the line to skip the line.

Every new line of your code should be covered by the existing tests or your own tests.

### Docs

If you implement a new feature, you also need to write docs for it for others to understand.
It should definitely lives in ``docs/``, and could possibly lives in ``README.md`` as well
if it's important.

If you don't know where the docs belong to, ask me in the issue/PR.

## Build and Test

### Build

To contribute, first fork this project under your account, then create a feature branch:

```
git clone https://github.com/<your_user_name>/viztracer.git
cd viztracer
git checkout -b <your_feature_branch>
```

``virtualenv``(or other package manager) is highly recommended for development.

```
python3 -m venv venv
source venv/bin/activate
# On Windows
# .\venv\Scripts\activate
```

Install the requirements for development

```
pip install -r requirements-dev.txt
```

To build the project on Linux/MacOS, you can simply do ``make``.

However, if you are on Windows or prefer more explicit build process, you can do the following:

```
# uninstall viztracer first
pip uninstall -y viztracer
# build and install
python setup.py build install
```

### Lint

Check lint with ruff and mypy

```
# On Unix
make lint

# explicit or windows
ruff check --fix
ruff format
mypy src/ --exclude src/viztracer/attach_process/
```

### Test

VizTracer uses built-in library ``unittest`` for testing.

You can do ``make test`` on Linux/MacOS, or do ``python -m unittest``. To run a specific
test, refer to unittest [docs](https://docs.python.org/3/library/unittest.html)

There might be a few tests that are not 100% stable on github actions. They should be listed in issues.
You should, however, make sure local tests pass before doing a pull request.

## Pull Request

Do a pull request to the ``master`` branch of ``gaogaotiantian/viztracer``, and I will review the code
and give feedbacks as soon as possible.


================================================
FILE: .github/FUNDING.yml
================================================
github: gaogaotiantian


================================================
FILE: .github/workflows/docs.yml
================================================
name: docs

on:
  push:
    branches: [ master ]
    paths:
      - "docs/**"
      - ".github/workflows/docs.yml"
  pull_request:
    paths:
      - "docs/**"
      - ".github/workflows/docs.yml"

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Install dependency
        run: pip install -r docs/requirements.txt
      - name: Build documentation
        run: sphinx-build -b html docs/source/ docs/build/


================================================
FILE: .github/workflows/lint.yml
================================================
name: lint

on:
  push:
    branches: [ master ]
  pull_request:

jobs:
  lint:
    strategy:
      matrix:
        python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependency
        run: pip install ruff mypy
      - name: Run ruff check
        run: ruff check
      - name: Run ruff format check
        run: ruff format --check
      - name: Run mypy 
        run: mypy src/ --exclude src/viztracer/attach_process/


================================================
FILE: .github/workflows/python-package.yml
================================================
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: build

on:
  push:
    branches: [ master ]
    paths:
      - "src/viztracer/**"
      - "tests/**"
      - "setup.py"
      - ".github/workflows/python-package.yml"
  pull_request:
    paths:
      - "src/viztracer/**"
      - "tests/**"
      - "setup.py"
      - ".github/workflows/python-package.yml"
  schedule:
    - cron: '0 10 * * *'

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  build:
    strategy:
      matrix:
        python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t']
        os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest, windows-11-arm]
        exclude:
          - python-version: '3.10'
            os: 'windows-11-arm'
          - python-version: '3.11'
            os: 'windows-11-arm'
    runs-on: ${{ matrix.os }}
    timeout-minutes: 30
    env:
      COREDUMPY_DUMP_DIR: ${{ github.workspace }}/coredumpy_data
    steps:
    - uses: actions/checkout@v4
      with:
        # This is necessary to get the PR head instead of base
        ref: ${{ github.event.pull_request.head.sha }}
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install gdb
      if: matrix.os == 'ubuntu-latest'
      run: |
        sudo apt-get update
        sudo apt-get install gdb
        echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
    - name: Setup lldb
      if: contains(matrix.os, 'macos')
      uses: maxim-lobanov/setup-xcode@v1
      with:
        xcode-version: latest-stable
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements-dev.txt
    - name: Build dist and test with pytest
      if: "!contains(matrix.os, 'windows')"
      run: |
        python -m build
        pip install dist/*.whl
        python -m pytest --junit-xml=./test-results.xml -o junit_family=legacy
    - name: Build dist and test with pytest on Windows
      if: contains(matrix.os, 'windows')
      run: |
        python -m build
        pip install (Get-ChildItem dist/*.whl)
        python -m pytest --junit-xml=./test-results.xml -o junit_family=legacy
    - name: Upload the test time artifacts
      uses: actions/upload-artifact@v4
      with:
        name: test_time_trace_${{ matrix.os }}_${{ matrix.python-version }}
        path: test_time_trace.json
        retention-days: 7
    - name: Upload test results
      if: (!cancelled()) && github.ref == 'refs/heads/master'
      uses: codecov/codecov-action@v5
      with:
        report_type: 'test_results'
        files: test-results.xml
        flags: ${{ matrix.os }}-${{ matrix.python-version }}
        name: VizTracer Tests
        token: ${{ secrets.codecov_token }}
    - name: Generate coverage report
      run: |
        coverage run --source viztracer --parallel-mode -m pytest
        coverage combine
        coverage xml -i
      env:
        COVERAGE_RUN: True
    - name: Upload coverage reports to Codecov
      uses: codecov/codecov-action@v5
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        files: coverage.xml
    - name: Upload coredumpy data if applicable
      uses: gaogaotiantian/upload-coredumpy@v0.2
      if: failure()
      with:
        name: coredumpy_data_${{ matrix.os }}_${{ matrix.python-version }}
        path: ${{ env.COREDUMPY_DUMP_DIR }}
        retention-days: 7


================================================
FILE: .github/workflows/release.yml
================================================
name: Python package build and publish

on:
  release:
    types: [created]

jobs:
  build-wheels:
    uses: ./.github/workflows/wheels.yml
    with:
      upload_artifacts: true

  deploy-wheels:
    needs: build-wheels
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.13
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build twine flake8 setuptools wheel
      - name: Build source tar
        run: |
          python -m build
      - name: Download wheels
        uses: actions/download-artifact@v4
        with:
          path: wheelhouse
          merge-multiple: true
      - name: Publish wheels to PyPI
        continue-on-error: true
        env:
          TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
          TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
        run: |
          twine upload --skip-existing dist/*tar* wheelhouse/*.whl


================================================
FILE: .github/workflows/wheels.yml
================================================
name: wheels

on:
  push:
    branches: [ master ]
    paths:
      - "src/viztracer/**"
      - "setup.py"
      - ".github/workflows/wheels.yml"
  pull_request:
    paths:
      - "src/viztracer/**"
      - "setup.py"
      - ".github/workflows/wheels.yml"
  workflow_call:
    inputs:
      upload_artifacts:
        required: false
        type: boolean
        default: false

jobs:
  build-wheels-linux:
    name: Build wheels on Linux for ${{ matrix.arch }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        manylinux-image: [manylinux2014]
        arch: [auto, aarch64]

    steps:
      - uses: actions/checkout@v4
      - name: Set up QEMU
        if: ${{ matrix.arch == 'aarch64' }}
        uses: docker/setup-qemu-action@v3
        with:
          image: tonistiigi/binfmt:master
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.11
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build twine setuptools wheel

      - name: Install cibuildwheel
        run: python -m pip install cibuildwheel -U

      - name: Build wheels
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_BUILD: cp310-* cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*
          CIBW_SKIP: '*musllinux*'
          CIBW_ARCHS: ${{ matrix.arch }}
          CIBW_MANYLINUX_*_IMAGE: ${{ matrix.manylinux-image }}
          CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux-image }}
          CIBW_ENABLE: 'cpython-freethreading'

      - name: Upload wheels
        if: ${{ inputs.upload_artifacts || false }}
        uses: actions/upload-artifact@v4
        with:
          name: wheels-${{ matrix.os }}-${{ matrix.arch }}
          path: wheelhouse/*.whl
          retention-days: 1

  build-wheels-macos-windows:
    name: Build wheels on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, macos-15-intel, windows-latest, windows-11-arm]

    steps:
      - uses: actions/checkout@v4
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build twine setuptools wheel

      - name: Install cibuildwheel
        run: python -m pip install cibuildwheel -U

      - name: Build wheels
        if: contains(matrix.os, 'macos')
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_BUILD: cp310-* cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*
          CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=14
          CIBW_ENABLE: 'cpython-freethreading'

      - name: Build wheels
        if: matrix.os == 'windows-11-arm'
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_BUILD: cp312-* cp313-* cp313t-* cp314-* cp314t-*
          CIBW_ENABLE: 'cpython-freethreading'

      - name: Build wheels
        if: "!contains(matrix.os, 'macos') && matrix.os != 'windows-11-arm'"
        run: python -m cibuildwheel --output-dir wheelhouse
        env:
          CIBW_BUILD: cp310-* cp311-* cp312-* cp313-* cp313t-* cp314-* cp314t-*
          CIBW_ENABLE: 'cpython-freethreading'

      - name: Upload wheels
        if: ${{ inputs.upload_artifacts || false }}
        uses: actions/upload-artifact@v4
        with:
          # Upload all wheels built in wheelhouse/*
          name: wheels-${{ matrix.os }}
          path: wheelhouse/*.whl
          retention-days: 1


================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Generated data
tests/data/*.json


================================================
FILE: .readthedocs.yml
================================================
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/source/conf.py

# Build documentation with MkDocs
#mkdocs:
#  configuration: mkdocs.yml

# Enable pdf download on readthedocs
formats:
  - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
  install:
    - requirements: docs/requirements.txt


================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
title: >-
  VizTracer - A debugging and profiling tool that can trace
  and visualize python code execution
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Tian
    family-names: Gao
    email: gaogaotiantian@hotmail.com
    orcid: 'https://orcid.org/0009-0006-9702-7067'
repository-code: 'https://github.com/gaogaotiantian/viztracer'
license: Apache-2.0


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


========================================================================

VizTracer Subcomponents:

VizTracer contains subcomponents with separate copyright notices and
license terms. Your use of the source code for these subcomponents is
also subject to the terms and conditions of the following licenses.

BSD-3-Clause (src/viztracer/html/LICENSE):

  src/viztracer/html/trace_viewer_*.html

Apache License V2 (src/viztracer/web_dist/LICENSE):

  src/viztracer/web_dist/*

Eclipse Public License v1.0 (src/viztracer/attach_process/LICENSE)

  src/viztracer/attach_process/*


================================================
FILE: MANIFEST.in
================================================
include LICENSE
include NOTICE.txt
include README.md
include setup.py

recursive-include src/viztracer/html *.css *.js
recursive-include src/viztracer/modules *.c *.h
recursive-include src/viztracer/web_dist *
recursive-include src/viztracer/attach_process *.py


================================================
FILE: Makefile
================================================
.PHONY: refresh build install build_dist json release lint test clean

refresh: clean build install lint

build:
	python -m build

install:
	pip install .

build_dist:
	make clean
	python -m build
	pip install dist/*.whl
	make test

json:
	python example/generate_examples.py

release:
	python -m twine upload dist/*

lint:
	ruff check --fix
	ruff format
	mypy src/ --exclude 'src/viztracer/attach_process/.*'

test:
	python -m pytest

clean:
	rm -rf __pycache__
	rm -rf tests/__pycache__
	rm -rf src/viztracer/__pycache__
	rm -rf build
	rm -rf dist
	rm -rf viztracer.egg-info
	rm -rf src/viztracer.egg-info
	pip uninstall -y viztracer


================================================
FILE: NOTICE.txt
================================================
VizTracer
Copyright 2020-2025 Tian Gao

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This project contains code from the following projects:

    Catapult (https://github.com/catapult-project/catapult)
    Copyright (c) 2012 The Chromium Authors. All rights reserved.
    - src/viztracer/html/trace_viewer_*.html

    Perfetto (https://github.com/google/perfetto)
    Copyright (c) 2017, The Android Open Source Project
    - src/viztracer/web_dist/*

    PyDev.Debugger (https://github.com/fabioz/PyDev.Debugger)
    - src/viztracer/attach_process/*


================================================
FILE: README.md
================================================
# VizTracer

[![build](https://github.com/gaogaotiantian/viztracer/workflows/build/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3Abuild)  [![ruff](https://github.com/gaogaotiantian/viztracer/workflows/lint/badge.svg)](https://github.com/gaogaotiantian/viztracer/actions?query=workflow%3ALint)  [![readthedocs](https://img.shields.io/readthedocs/viztracer)](https://viztracer.readthedocs.io/en/stable/)  [![coverage](https://img.shields.io/codecov/c/github/gaogaotiantian/viztracer)](https://codecov.io/gh/gaogaotiantian/viztracer)  [![pypi](https://img.shields.io/pypi/v/viztracer.svg)](https://pypi.org/project/viztracer/)  [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/gaogaotiantian.viztracer-vscode?logo=visual-studio)](https://marketplace.visualstudio.com/items?itemName=gaogaotiantian.viztracer-vscode)  [![support-version](https://img.shields.io/pypi/pyversions/viztracer)](https://img.shields.io/pypi/pyversions/viztracer)  [![license](https://img.shields.io/github/license/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/blob/master/LICENSE)  [![commit](https://img.shields.io/github/last-commit/gaogaotiantian/viztracer)](https://github.com/gaogaotiantian/viztracer/commits/master)  [![sponsor](https://img.shields.io/badge/%E2%9D%A4-Sponsor%20me-%23c96198?style=flat&logo=GitHub)](https://github.com/sponsors/gaogaotiantian)

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.

The front-end UI is powered by [Perfetto](https://perfetto.dev/). **Use "AWSD" to zoom/navigate**.
More help can be found in "Support - Controls".

[![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/example.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/example.png)


## Highlights

* Detailed function entry/exit information on timeline with source code
* Super easy to use, no source code change for most features, no package dependency
* Low overhead, probably the fastest tracer in the market
* Supports threading, multiprocessing, subprocess, async and PyTorch
* Powerful front-end, able to render GB-level trace smoothly
* Works on Linux/MacOS/Windows

## Install

The preferred way to install VizTracer is via pip

```sh
pip install viztracer
```

## Basic Usage

### Command Line

```sh
# Instead of "python3 my_script.py arg1 arg2"
viztracer my_script.py arg1 arg2
```

<details>

<summary>
A <code>result.json</code> file will be generated, which you can open with <code>vizviewer</code>
</summary>

```sh
# You can display all the files in a directory and open them in browser too
vizviewer ./
# For very large trace files, try external trace processor
vizviewer --use_external_processor result.json
```

vizviewer will host an HTTP server on ``http://localhost:9001``. You can also open your browser and use that address.

If you do not want vizviewer to open the webbrowser automatically, you can use

```sh
vizviewer --server_only result.json
```

If you just need to bring up the trace report once, and do not want the persistent server, use

```sh
vizviewer --once result.json
```

</details>

```sh
vizviewer result.json
```

A [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=gaogaotiantian.viztracer-vscode)
is available to make your life even easier.

<p align="center">
    <img src="https://github.com/gaogaotiantian/viztracer-vscode/raw/master/assets/demo.gif" />
</p>

<details>

<summary>
Add <code>--open</code> to open the reports right after tracing
</summary>

```sh
viztracer --open my_script.py arg1 arg2
viztracer -o result.html --open my_script.py arg1 arg2
```

</details>

<details>

<summary>
modules and console scripts(like <code>flask</code>) are supported as well
</summary>

```sh
viztracer -m your_module
```

```sh
viztracer flask run
```

</details>

### Inline

You can also manually start/stop VizTracer in your script as well.

```python
from viztracer import VizTracer

tracer = VizTracer()
tracer.start()
# Something happens here
tracer.stop()
tracer.save() # also takes output_file as an optional argument
```

Or, you can do it with ```with``` statement

```python
with VizTracer(output_file="optional.json") as tracer:
    # Something happens here
```

### Jupyter

If you are using Jupyter, you can use viztracer cell magics.

```python
# You need to load the extension first
%load_ext viztracer
```

```python
%%viztracer
# Your code after
```

A ``VizTracer Report`` button will appear after the cell and you can click it to view the results

### PyTorch

VizTracer can log native calls and GPU events of PyTorch (based on `torch.profiler`) with
``--log_torch``.

```python
with VizTracer(log_torch=True) as tracer:
    # Your torch code
```

```sh
viztracer --log_torch your_model.py
```

## Advanced Usage

### Trace Filter

VizTracer can filter out the data you don't want to reduce overhead and keep info of a longer time period before you dump the log.

* [Min Duration](https://viztracer.readthedocs.io/en/stable/filter.html#min-duration)
* [Max Stack Depth](https://viztracer.readthedocs.io/en/stable/filter.html#max-stack-depth)
* [Include Files](https://viztracer.readthedocs.io/en/stable/filter.html#include-files)
* [Exclude Files](https://viztracer.readthedocs.io/en/stable/filter.html#exclude-files)
* [Ignore C Function](https://viztracer.readthedocs.io/en/stable/filter.html#ignore-c-function)
* [Sparse Log](https://viztracer.readthedocs.io/en/stable/filter.html#log-sparse)

### Extra Logs without Code Change

VizTracer can log extra information without changing your source code

* [Any Variable/Attribute with RegEx](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-variable)
* [Function Entry](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-function-entry)
* [Variables in Specified Function](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-function-execution)
* [Garbage Collector Operation](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-garbage-collector)
* [Function Input Arguments](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-function-arguments)
* [Function Return Value](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-function-return-value)
* [Audit Events](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-audit)
* [Raised Exceptions](https://viztracer.readthedocs.io/en/stable/extra_log.html#log-exception)

### Add Custom Event

VizTracer supports inserting custom events while the program is running. This works like a print debug, but you can know when this print happens while looking at trace data.

* [Instant Event](https://viztracer.readthedocs.io/en/stable/custom_event_intro.html#instant-event)
* [Variable Event](https://viztracer.readthedocs.io/en/stable/custom_event_intro.html#variable-event)
* [Duration Event](https://viztracer.readthedocs.io/en/stable/custom_event_intro.html#duration-event)

## Misc

### Multi Thread Support

For Python3.12+, VizTracer supports Python-level multi-thread tracing without the need to do any modification to your code.

For versions before 3.12, VizTracer supports python native ```threading``` module. Just start ```VizTracer``` before you create threads and it will just work.

For other multi-thread scenarios, you can use ``enable_thread_tracing()`` to notice VizTracer about the thread to trace it.

[![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/multithread_example.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/multithread_example.png)

Refer to [multi thread docs](https://viztracer.readthedocs.io/en/stable/concurrency.html) for details


### Multi Process Support

VizTracer supports ```subprocess```, ```multiprocessing```, ```os.fork()```, ```concurrent.futures```, and ```loky``` out of the box.

For more general multi-process cases, VizTracer can support with some extra steps.

[![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/multiprocess_example.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/multiprocess_example.png)

Refer to [multi process docs](https://viztracer.readthedocs.io/en/stable/concurrency.html) for details

### Async Support

VizTracer supports ```asyncio``` natively, but could enhance the report by using ```--log_async```.

[![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/async_example.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/async_example.png)

Refer to [async docs](https://viztracer.readthedocs.io/en/stable/concurrency.html) for details

### Flamegraph

Perfetto supports native flamegraph, just select slices on the UI and choose "Slice Flamegraph".

[![example_img](https://github.com/gaogaotiantian/viztracer/blob/master/img/flamegraph.png)](https://github.com/gaogaotiantian/viztracer/blob/master/img/flamegraph.png)

### Remote attach

VizTracer supports remote attach to an arbitrary Python process to trace it, as long as viztracer is importable

Refer to [remote attach docs](https://viztracer.readthedocs.io/en/stable/remote_attach.html)

### JSON alternative

VizTracer needs to dump the internal data to json format. It is recommended for the users to install ```orjson```, which is much faster than the builtin ```json``` library. VizTracer will try to import ```orjson``` and fall back to the builtin ```json``` library if ```orjson``` does not exist.

## Performance

VizTracer puts in a lot of effort to achieve low overhead. The actual performance impact largely depends on your application.
For typical codebases, the overhead is expected to be below 1x. If your code has infrequent function calls,
the overhead could be minimal.

<details>

<summary>
Detailed explanation
</summary>

The overhead introduced by VizTracer is basically a fixed amount of time during function entry and exit, so the more time spent on
function entries and exits, the more overhead will be observed. A pure recursive ```fib``` function could suffer 3x-4x overhead
on Python3.11+ (when the Python call is optimized, before that Python call was slower so the overhead ratio would be less).

In the real life scenario, your code should not spend too much time on function calls (they don't really do anything useful), so
the overhead would be much smaller.

Many techniques are applied to minimize the overall overhead during code execution to reduce the inevitable skew introduced by
VizTracer (the report saving part is not as critical). For example, VizTracer tries to use the CPU timestamp counter instead of
a syscall to get the time when available. On Python 3.12+, VizTracer uses ```sys.monitoring``` which has less overhead than
```sys.setprofile```. All of the efforts made it observably faster than ```cProfile```, the Python stdlib profiler.

However, VizTracer is a tracer, which means it has to record every single function entry and exit, so it can't be as fast as
the sampling profilers - they are not the same thing. With the extra overhead, VizTracer provides a lot more information than
normal sampling profilers.

</details>

## Sponsors

We thank our sponsors to support VizTracer. If you want your logo here,
check our [sponsor page](https://github.com/sponsors/gaogaotiantian) or contact
the [author](https://github.com/gaogaotiantian) directly.

<a href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=viztracer" target="_blank">
    <img src="https://assets.testmu.ai/resources/images/logos/black-logo.png" style="vertical-align: middle;" width="200" />
</a>

## Documentation

For full documentation, please see [https://viztracer.readthedocs.io/en/stable](https://viztracer.readthedocs.io/en/stable)

## Bugs/Requests

Please send bug reports and feature requests through [github issue tracker](https://github.com/gaogaotiantian/viztracer/issues). VizTracer is currently under development now and it's open to any constructive suggestions.

## License

Copyright 2020-2025 Tian Gao.

Distributed under the terms of the  [Apache 2.0 license](https://github.com/gaogaotiantian/viztracer/blob/master/LICENSE).


================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS    ?=
SPHINXBUILD   ?= sphinx-build
SOURCEDIR     = source
BUILDDIR      = build

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


================================================
FILE: docs/make.bat
================================================
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd


================================================
FILE: docs/requirements.txt
================================================
Sphinx==7.2.6
sphinx-rtd-theme==1.3.0

================================================
FILE: docs/source/basic_usage.rst
================================================
Basic Usage
===========

Command Line
------------

The easiest way to use VizTracer is through command line. Assume you have a python script to profile and the normal way to run it is:

.. code-block::

    python3 my_script.py


You can simply use VizTracer by

.. code-block::
    
    # These two commands are equivalent. 
    # In this docs, they might both be used, but you can choose either one that you prefer.
    viztracer my_script.py
    # OR
    python3 -m viztracer my_script.py

which will generate a ``result.json`` file in the directory you run this command. You can open it with ``vizviewer``

.. code-block::

    vizviewer result.json

If your script needs arguments like 

.. code-block::
    
    python3 my_script.py arg1 arg2

Just feed it as it is to ``viztracer``

.. code-block::
    
    viztracer my_script.py arg1 arg2

It's possible that there's a conflict or an ambiguity. ``viztracer`` takes ``--`` as a separator between arguments to ``viztracer`` and
positional arguments to your script.

.. code-block::
    
    viztracer -o result.json -- my_script.py -o output_for_my_script.json

You can also run a module with VizTracer

.. code-block::

    viztracer -m your_module

You can specify the output file using ``-o`` or ``--output_file`` argument. The default output file is ``result.json``. 
Three types of files are supported, html, json and gz(gzip of json file).

.. code-block::

    viztracer -o other_name.html my_script.py
    viztracer -o other_name.json my_script.py
    viztracer -o other_name.json.gz my_script.py

You can make viztracer to generate a unique name for the output file by using ``-u`` or ``--unique_output_file``

.. code-block::

    viztracer -u my_script.py
    viztracer --output_dir ./my_reports -u my_script.py

Inline
------

Sometimes the command line may not work as you expected, or you do not want to profile the whole script. You can manually start/stop the profiling in your script as well.

First of all, you need to import ``VizTracer`` class from the package

.. code-block:: python

    from viztracer import VizTracer

You can trace code with the ``with`` statement

.. code-block:: python
    
    with VizTracer(output_file="optional.json") as tracer:
        # Something happens here

Or you can create a ``VizTracer`` object and manually enable/disable the profile using ``start()`` and ``stop()`` function.

.. code-block:: python

    tracer = VizTracer()
    tracer.start()
    # Something happens here
    tracer.stop()
    tracer.save() # also takes output_file as an optional argument

Jupyter
-------

If you are using Jupyter, you can use viztracer cell magics.

.. code-block:: python

    # You need to load the extension first
    %load_ext viztracer

.. code-block:: python

    %%viztracer
    # Your code after

.. code-block:: python

    # you can define arguments of VizTracer in magic
    %%viztracer -p 8888
    # Your code after

A ``Show VizTracer Report`` button will appear after the cell and you can click it to view the results.

Cell magic ``%%viztracer`` supports some of the command line arguments:

* ``--port``
* ``--output_file``
* ``--max_stack_depth``
* ``--ignore_c_function``
* ``--ignore_frozen``
* ``--log_func_args``
* ``--log_print``
* ``--log_sparse``


PyTorch
-------

VizTracer can log native calls and GPU events of PyTorch (based on ``torch.profiler``) with
``--log_torch``.

.. code-block:: python

    with VizTracer(log_torch=True) as tracer:
        # Your torch code

.. code-block::

    viztracer --log_torch your_model.py


Display Report
--------------

VizTracer will generate a ``result.json`` by default, which could be opened with ``vizviewer``

.. code-block::

    vizviewer result.json

You can also display all the files in a directory and open the reports in browser too. This is helpful
when you have many files in one directory and want to check some or all of them.

This could also be used when you have a report directory where reports are frequently added. You can
leave ``vizviewer`` in the background and browse your reports with pure browser.

.. code-block::

    vizviewer your_directory/

``vizviewer`` will bring up webbrowser and open the report by default. You can disable this feature and
only host an HTTP server on ``localhost:9001``, which you can access through your browser

.. code-block::

    vizviewer --server_only result.json

If you do not want to host the HTTP server forever, you can use ``--once`` so the server will shut down
after serving the trace file

.. code-block::

    vizviewer --once result.json

You can serve your HTTP server on a different port with ``--port`` or its equivalent ``-p``

.. code-block::

    vizviewer --port 10000 result.json

You can use the external trace processor with ``--use_external_processor``, which does not have the
RAM limits as the browser. This is helpful when you try to open a large trace file.

.. code-block::

    vizviewer --use_external_processor result.json

``vizviewer`` can also show standalone html report - it just host a simple HTTP server for the file

.. code-block::

    vizviewer result.html

Or, you can use ``--open`` for ``viztracer``, it will then open the report after it generates it

.. code-block::

    viztracer --open my_script.py
    viztracer -o result.html --open my_script.py

Circular Buffer Size
--------------------

VizTracer uses a circular buffer to store the entries. When there are too many entries, it will only store the latest ones so you know what happened
recently. The default buffer size is 1,000,000(number of entries), which takes about 150MiB disk space.
You can specify this when you instantiate a ``VizTracer`` object or through CLI.

.. code-block:: python

    viztracer --tracer_entries 500000 my_script.py

OR

.. code-block:: python

    tracer = VizTracer(tracer_entries=500000)

Notice it also takes a significant amount of RAM when VizTracer is tracing the program.

VizTracer will preallocate about ``tracer_entries * 100B`` RAM for circular buffer. It also requires about ``1-2MB`` per 10k entries to
dump the json file.

Configuration file
------------------

You can use a configuration file to set the default options for ``viztracer``, which could help you avoid typing the same arguments for multiple runs.

The default filename for ``viztracer`` configuration file is ``.viztracerrc``. `viztracer` will try to find ``.viztracerrc`` in current working directory.
You can also specify your own configuration file with
``viztracer --rcfile <your_config_file>``. The format of the configuration file is very similar to ``ini`` file, which could be parsed by
built in ``configparser``.

.. code-block::

    [default]
    log_var = a.* latest
    ignore_c_function = True
    output_file = vizreport.json
    max_stack_depth = 10

``[default]`` can't be omitted and all the arguments should be in a key-value pair format, where the key is the argument name(without ``--``) and the val is the
value you need to pass in. Please notice that there are some arguments in ``viztracer`` that do not take parameters(like `--ignore_c_function``), you
need to pass ``True`` in the config file to make the config parser happy. If you need to pass multiple parameters to an argument(like ``log_var``), just
use space to separate the parameters like you do in cmdline interface.

Combine Reports
---------------

VizTracer can put multiple json reports together and generate a new trace file. This is especially helpful when you have multiple
trace generators, for example, running multiple processes with VizTracer. As VizTracer uses Monotonic Clock, you can save reports
with different VizTracer instances without worrying about timestamp alignment issue. You can even generate your own data and
combine with VizTracer reports, like VizPlugins does.

.. code-block::

    viztracer --combine process1.json process2.json -o full_report.json

Another usage of combining reports would be to compare between different runs of the same program. Unlike combining from multiple
sources, this requires a pre-alignment of all the trace data. VizTracer also provides a way to align the start of all reports for
this usage.

.. code-block::

    viztracer --align_combine run1.json run2.json -o compare_report.json

You can also set a sync-marker from your source code, and VizTracer will align both reports to this particular timestamp.

.. code-block::

    from viztracer import get_tracer
    get_tracer().set_sync_marker()


Compress Your Report
--------------------

VizTracer supports compressing your json report. The general compression ratio is about 50:1 to 100:1 for a large report.

You can compress your report with ``--compress``.

.. code-block:: 

    viztracer --compress result.json -o result.cvf 

You can also decompress your report with ``--decompress``

.. code-block:: 

    viztracer --decompress result.cvf -o result.json 


================================================
FILE: docs/source/concurrency.rst
================================================
Concurrency
===========

VizTracer supports concurrency tracing, including asyncio, multi-thread and multi-process. 

asyncio
-------

VizTracer supports ``asyncio`` module natively. However, you can use ``--log_async`` to make the report clearer.

Under the rug, asyncio is a single-thread program that's scheduled by Python built-ins. With ``--log_async``, you can visualize
different tasks as "threads", which could separate the real work from the underlying structure, and give you a more intuitive
understanding of how different tasks consume the runtime.

.. code-block::

    viztracer --log_async my_script.py

Multi Thread
------------

For python3.12+, VizTracer supports all Python level multi-thread. You don't need to do anything.

For versions before 3.12, VizTracer supports python native ``threading`` module without the need to do any modification to your code. 
Just start ``VizTracer`` before you create threads and it will just work.

If you are using multi-thread via other mechanism, for example, PyQt thread, VizTracer can't support it out of the box.
However, you can inform VizTracer that you are in a separate thread and enable tracing in that thread with ``enable_thread_tracing``

.. code-block:: python

    from viztracer import get_tracer

    class YourThread:
        def run(self):
            # This will tell VizTracer to trace the thread
            get_tracer().enable_thread_tracing()

subprocess
----------

VizTracer supports ``subprocess``. You need to make sure the main process exits after subprocesses finish.

.. code-block::

    viztracer my_script_using_subprocess.py

This will generate a report for all processes. There are a couple of things you need to be aware though. 

VizTracer patches subprocess module(to be more specific, ``subprocess.Popen``) to make this work like a magic. However, it will only patch
when the args passed to ``subprocess.Popen`` is a list(``subprocess.Popen(["python", "subscript.py"])``) and the first argument starts with
``python``. This covers most of the cases, but if you do have a situation that can't be solved, you can raise an issue and we can talk
about solutions.

multiprocessing and concurrent.futures
--------------------------------------

VizTracer supports ``multiprocessing`` and ``concurrent.futures``, and it will make the main process wait for all the other processes to finish
so the report can include all processes. You can skip the waiting using Ctrl+C.

.. code-block::

    viztracer my_script_using_multiprocess.py

This feature is available on all platforms and for both ``fork`` and ``spawn`` type ``Process``.

However, on Windows, ``multiprocessing.Pool`` won't work with VizTracer because there's no way to gracefully catch the exit of the process

os.fork()
---------

VizTracer supports ``os.fork``. The main process will wait for forked processes to finish.
You can even use ``os.exec()`` and its other forms after you fork the process. Of course
VizTracer only records what happens before ``os.exec()``, you need :ref:`generic multi process support <generic_multi_process>`
to record what happens after.

loky
----

VizTracer supports ``loky>=3.0.0`` as ``loky`` implemented the ``viztracer`` initializer. You can log ``loky`` processes
just as easy as builtin ``multiprocessing``

.. _generic_multi_process:

generic multi process support
-----------------------------

VizTracer has a simple instrumentation for all the third party libraries to integrate VizTracer to their multi process code.

First, your main process has to be executed by ``viztracer``. Inline VizTracer won't work. In your program, you need
``get_tracer().init_kwargs``, which is a ``Dict`` that can be easily serializable with ``pickle`` or other libraries.

Then, pass this argument to your sub-process, and instantiate a VizTracer object with it

.. code-block:: python

    # init_kwargs is the argument from main process
    tracer = VizTracer(**init_kwargs)
    tracer.register_exit()
    tracer.start()

And you are good to go. The main process should collect the data from sub-processes automatically and put together a report.

combine reports
---------------

You can generate json reports from different processes and combine them manually as well. It is recommended to use
``--pid_suffix`` so the report will be saved as a json file ending with the pid of the process. You can specify your own file name using ``-o`` too.

.. code-block::
    
    viztracer --pid_suffix single_process.py
    # or
    viztracer -o process1.json single_process.py

You can specify the output directory if you want to

.. code-block::

    viztracer --pid_suffix --output_dir ./temp_dir single_process.py

After generating ``json`` files, you need to combine them

.. code-block::
    
    viztracer --combine ./temp_dir/*.json

This will generate the report with all the process info. You can specify ``--output_file`` when using ``--combine``.


================================================
FILE: docs/source/conf.py
================================================
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os

import sphinx_rtd_theme  # noqa: F401

# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = "VizTracer"
copyright = "2020-2024, Tian Gao"
author = "Tian Gao"

# The full version, including alpha/beta/rc tags
release = "unknown"
init_path = os.path.join(
    os.path.dirname(__file__), "..", "..", "src", "viztracer", "__init__.py"
)
with open(init_path) as f:
    for line in f.readlines():
        if line.startswith("__version__"):
            # __version__ = "0.9"
            delim = '"' if '"' in line else "'"
            release = line.split(delim)[1]
            break


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx_rtd_theme"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []


================================================
FILE: docs/source/contact.rst
================================================
Contact Us
==========

If you have any questions, bug reports or feature requests, please go to `github issue <https://github.com/gaogaotiantian/viztracer/issues>`_

================================================
FILE: docs/source/custom_event.rst
================================================
Custom Event
============

``_EventBase`` is the base class of ``VizCounter`` and ``VizObject``. It should never be used directly.

.. py:class:: _EventBase(tracer,\
            name=None,\
            trigger_on_change=True\
            include_attributes=[]\
            exclude_attributes=[])
    
    .. py:attribute:: tracer
        :type: VizTracer

        an object of ``VizTracer``
        
        ``tracer`` can be set to ``None`` so the logging operation will be ``NOP``. Your program will
        run normally with the instrumented code even when you are not using viztracer. 
    
    .. py:attribute:: name
        :type: string
        :value: None

        name of the event which will show on trace viewer. If not specified, class name will be used

    .. py:attribute:: trigger_on_change
        :type: boolean
        :value: True

        whether to trigger log every time a public attribute is changed
    
    .. py:attribute:: include_attributes
        :type: list of string
        :value: []

        a list of attributes that will trigger the log and be included in the report. If not empty, ``_EventBase`` will behave like whitelist

    .. py:attribute:: exclude_attributes
        :type: list of string
        :value: []

        a list of attributes that will not trigger the log and not be included in the report. If not empty, ``_EventBase`` will behave like blacklist

    .. py:method:: log()
    .. py:method:: _viztracer_log()

        manually log the current attributes

    .. py:method:: config()
    .. py:method:: _viztracer_set_config(key, value)

        :param str key: ``"trigger_on_change"``, ``"include_attributes"`` or ``"exclude_attribtues"``
        :param value: the value you want to set on corresponding config
    
    .. py:decoratormethod:: triggerlog(when="after")

        :param str when: ``"after"``, ``"before"`` or ``"both"`` to specify when the ``log()`` function is called

        ``triggerlog`` is a decorator for class methods to do auto-log when the method is called. 


.. py:class:: VizCounter(_EventBase)

    ``VizCounter`` should be used to track a numeric variable through time. You can track CPU usage, memory usage, or any numeric variable you are interested in using ``VizCounter``

    .. code-block:: python

        from viztracer import VizTracer
        from viztracer.vizcounter import VizCounter
        tracer = VizTracer()
        tracer.start()
        counter = VizCounter(tracer, "counter name")
    
    Because ``VizCounter`` has ``trigger_on_change`` on by default, any writes to its public attributes(does not start with ``_``) will be automatically logged

    .. code-block:: python

        counter.a = 2
        counter.b = 1.2

    You can turn ``trigger_on_change`` off and manually decide when to log

    .. code-block:: python

        counter = VizCounter(tracer, "counter name", trigger_on_change=False)
        # OR
        counter = VizCounter(tracer, "counter name")
        counter.config("trigger_on_change", False)

    .. code-block:: python

        counter.a = 1
        counter.b = 1
        # Until here, nothing happens
        counter.log() # trigger the log

.. py:class:: VizObject(_EventBase)

    ``VizObject`` is almost exactly the same as ``VizCounter``, with the exception that ``VizObject`` can log jsonifiable objects(``dict``, ``list``, ``string``, ``int``, ``float``)


Inheritance
-----------

In practice, you can inherit from ``VizCounter`` or ``VizObject`` class and build your own class so it will be much easier to track the data in your class. Remember you need to do ``__init__`` function of the base class! If your class has a lot of attributes and they are frequently being written to, it is wise to turn off ``trigger_on_change``

.. code-block:: python

    class MyClass(VizObject):
        def __init__(self, tracer):
            super().__init__(tracer, "my name", trigger_on_change=False)

You can manually do log by

.. code-block:: python

    obj = MyClass(tracer)
    obj.log()

or you can decorate your class method with ``triggerlog`` to trigger log on function call

.. code-block:: python

    class MyClass(VizObject):
        @VizObject.triggerlog
        def log_on_this_function():
            #function

================================================
FILE: docs/source/custom_event_intro.rst
================================================
Custom Events
=============

You may want to insert custom events to the report while you are tracing the program. 

VizTracer supports three kinds of custom events:

* Instant Event
* Variable Event
* Duration Event

Instant Event
-------------

Instant Event is a log at a specific timestamp, showing as an arrow. It's useful
to log a transient event. You need to give it a ``name`` which is a string, and an
argument ``args``. They will be displayed in the report

``args`` has to be a jsonifiable object, normally a string, or a combination
of dict, list, string and number.

``scope`` can be set to ``t`` (default), ``p`` or ``g``, for thread, process and
global.

.. code-block:: python

    tracer.log_instant(f"Event1", args=args, scope="p")

Variable Event
--------------

Variable Event is a way to log a specific variable in your program and display it in the report.

If the variable you log is a number, VizTracer will use a counter event to display it, otherwise
instant event will be used.

A ``name`` should be given for the variable, then the variable itself

.. code-block:: python

    trace.log_var("name for the var", var)


Magic Comment
-------------

You can use magic comment to log instant events and variable events.

In this way, you'll have 0 overhead and side effect when you run your program normally, and log the events when you use
viztracer to trace it

.. code-block:: python

    # !viztracer: log_instant("start logging")
    a = 3
    # !viztracer: log_var("a", a)

Or you can use inline magic comment ``# !viztracer: log``, which will log the assigned value if the statement is an assign
or it will log an instant event indicating this line is executed

.. code-block:: python

    # This will log an instant event with name "f()"
    f()  # !viztracer: log

    # This will log the variable a
    a = 3  # !viztracer: log

You can also do conditional log with ``if``

.. code-block:: python

    # This will log the variable a
    a = 3  # !viztracer: log if a == 3
    # This has the same effect
    # !viztracer: log_var("a", a)

You need ``--magic_comment`` option for ``viztracer`` to trigger the magic comment

.. code-block::

    viztracer --magic_comment your_program.py

.. _duration_event_label:

Duration Event
--------------

Duration Event is almost the same as function call event that normally being logged automatically,
with the only exception that it does not have to be a function.

You can log any piece of code using duration event and it will look like a function call event
in your final report.

.. code-block:: python
    
    from viztracer import get_tracer

    with get_tracer().log_event("my event name"):
        # some code running here

You should use ``log_event`` method of your tracer, which is accessible through ``get_tracer()``
function when you are using CLI, or just pass the tracer if you are using inline.

This feature is especially helpful when you are using :ref:`log_sparse_label`.

================================================
FILE: docs/source/decorator.rst
================================================
Decorator
=========

.. py:decorator:: ignore_function

    ``@ignore_function`` can tell VizTracer to skip on functions you specified.

    .. code-block:: python

        # This only works when there's a globally registered tracer
        @ignore_function
        def function_you_want_to_ignore():
            # function body

        # You can specify tracer if no global tracer is registered
        @ignore_function(tracer=tracer)
        def function_you_want_to_ignore():
            # function body

.. py:decorator:: trace_and_save(method=None, output_dir="./", **viztracer_kwargs)

    :param function method: trick to make both ``@trace_and_save`` and ``@trace_and_save(**kwargs)`` work
    :param str output_dir: output directory you want to put your logs in
    :param dict viztracer_kwargs: kwargs for VizTracer

    ``@trace_and_save`` can be used to trace a certain function and save the result as the program goes.
    This can be very helpful when you are running a very long program and just want to keep recording
    something periodically. You won't drain your memory and the parsing/dumping will be done in a new process,
    which can minimize the performance impact to your main process.

    This decorator will use ``fork`` if the start method is ``"fork"``. Otherwise it will use the same process
    to dump the report.

    You can pass any argument you want to ``VizTracer`` by giving it to the decorator

    .. code-block:: python

        @trace_and_save(output_dir="./mylogs", ignore_c_function=True)
        def function_you_want_to_trace():
            # function body

        # this works as well
        @trace_and_save
        def function_you_want_to_trace():
            # function body

.. py:decorator:: log_sparse(func=None, stack_depth=0, dynamic_tracer_check=False)

    You can make VizTracer log only certain functions using ``--log_sparse`` mode.

    :param function func: callable to decorate
    :param int stack_depth: log the function and its descendants with a limit stack depth
    :param bool dynamic_tracer_check: run time check of tracer

    .. code-block:: python

        from viztracer import log_sparse

        # @log_sparse will only log this function
        @log_sparse
        def function_you_want_to_log():
            # function body

        # @log_sparse(stack_depth=5) will log this function and its descendants
        # with a limit stack depth of 5
        # Nested @log_sparse with stack_depth won't work
        # (only the outermost function and its stack will be logged)
        @log_sparse(stack_depth=5)
        def function_you_want_to_log():
            # function body

        # Use dynamic_tracer_check=True if you use tracer as a context manager (or with %%viztracer).
        @log_sparse(dynamic_tracer_check=True)
        def function_you_want_to_log():
            # function body

        with VizTracer(log_sparse=True):
            function_you_want_to_log()


================================================
FILE: docs/source/extra_log.rst
================================================
Extra Log
=========

VizTracer features with many extra log possibilities **without even changing your source code**. 
You can start VizTracer from command line and use command line arguments to control what
you need to log.

Most of the features analyzes the AST generated from the source code and add nodes into it, so
the overhead is minimal. However, some features like ``log_func_args`` will introduce a large overhead.

Log Variable
------------

You can log any variable using regex matching to the variable name.
This is like adding ``print`` after assigning the variable without actually writing the code.
The log will appear in the report as an Instant Event, and the variables ``repr`` will be showed

.. code-block:: 

    viztracer --log_var <var_name> -- my_script.py

``--`` is added to resolve the ambiguity. Every time a variable matches regex ``<var_name>`` is assigned a value, it will be logged.
If you don't know what regex is, simply using the full name of the variable as ``<var_name>`` will allow you to log the variable

Log Number
----------

Similar to `Log Variable`_, you can log any variable as a number, which will be logged as Counter Event. 
The report will visualize the number through time as a separate signal like ``VizCounter`` did. 

.. code-block:: 

    viztracer --log_number <var_name> -- my_script.py

``--`` is added to resolve the ambiguity. Every time a variable matches regex ``<var_name>`` is assigned a value, it will be logged.
If you don't know what regex is, simply using the full name of the variable as ``<var_name>`` will allow you to log the variable

Using ``--log_number`` on non-numeric variables will raise an exception.

Log Attribute
-------------

You can log writes to attributes based on the name of the attribute. This is useful when you want to track an attribute of
an object, but there are just too many entries to it. It could be ``self.attr_name``, ``obj.attr_name`` or even 
``obj_list[0].attr_name``. With ``log_attr`` you can log the attributes matching the regex as an Instant Event.

.. code-block:: 

    viztracer --log_attr <attr_name> -- my_script.py

``--`` is added to resolve the ambiguity. Every time an attribute matches regex ``<attr_name>`` is assigned a value, it will be logged.
If you don't know what regex is, simply using the full name of the attribute as ``<attr_name>`` will allow you to log the attribute

Log Function Entry
------------------

You can log when a function is called. This is helpful to label the timeline for some crucial function.
The log will be displayed as an Instant Event.

.. code-block:: 

    viztracer --log_func_entry <func_name> -- my_script.py

``--`` is added to resolve the ambiguity. Every time an function matches regex ``<func_name>`` is called, it will be logged.
If you don't know what regex is, simply using the full name of the function as ``<func_name>`` will allow you to log the function 

Log Function Execution
----------------------

You can log function execution details. VizTracer will record all the assignments in specified functions and display
them in the detailed information of the generated report. The log will be showed in function entry's ``args`` list.

.. code-block:: 

    viztracer --log_func_exec <func_name> -- my_script.py

``--`` is added to resolve the ambiguity. Every time an function matches regex ``<func_name>`` is called, its execution will be logged.
If you don't know what regex is, simply using the full name of the function as ``<func_name>`` will allow you to log the function 

Log Audit
---------

You can log audit events introduced since python 3.8. The audit events will be logged as instant events.

.. code-block::

    # -- is added to resolve ambiguity
    viztracer --log_audit import builtins.input -- my_script.py

    # regex is supported
    viztracer --log_audit os.* -- my_script.py

    # If no argument is given, log every audit
    viztracer --log_audit -- my_script.py

    # You sometimes need to quote the regex to avoid command line ambiguity
    # (Linux terminal would think that you are passing files starts with '.')
    viztracer --log_audit ".*" -- my_script.py

Log Exception
-------------

You can log raised exceptions. All raised exceptions, whether caught or not, will be displayed as an Instant Event
in the report.

.. code-block:: 

    viztracer --log_exception my_script.py

Log Function Arguments 
----------------------

You can log every function's arguments as ``string``, aka their ``__repr__``. The arguments will be stored in each python function entry 
under ``args["func_args"]``. You can overwrite the object's ``__repr__`` function to log the object as you need.

You can enable this feature in command line or using inline. 

.. code-block:: 
    
    viztracer --log_func_args my_script.py

.. code-block:: python
    
    tracer = VizTracer(log_func_args=True)

**This feature will introduce a very large overhead(depends on your argument list), so be aware of it**

You can log additional arbitrary (key, value) pairs for your function entry using ``add_func_args()``. Refer to :doc:`viztracer` for it's usage

Log Function Return Value
-------------------------

VizTracer can log every function's return value as ``string``, aka it's ``__repr__``. The return value will be stored in each python function entry 
under ``args["return_value"]``. You can overwrite the object's ``__repr__`` function to log the object as you need.

You can enable this feature in command line or using inline. 

.. code-block:: 
    
    viztracer --log_func_retval my_script.py

.. code-block:: python
    
    tracer = VizTracer(log_func_retval=True)

Log Function Argument And Return Value With Custom Function
-----------------------------------------------------------

You can log every function's arguments and return value with a custom function. You can feed your own function to ``VizTracer``

.. code-block:: python

    def myrepr(obj):
        if isinstance(obj, MyClass):
            return f"MyClass({obj.value})"
        return repr(obj)

    tracer = VizTracer(log_func_args=True, log_func_repr=myrepr)

From the CLI, you can use the ``--log_func_with_objprint`` option to log with objprint

.. code-block::

    viztracer --log_func_args --log_func_with_objprint my_script.py

Log Print
---------

You can intercept ``print()`` function and record the data it prints to the report as an Instant Event. This is like doing print debug on timeline.

You can do this simply by:

.. code-block:: 

    viztracer --log_print my_script.py

OR

.. code-block:: python

    tracer = VizTracer(log_print=True)

Log Garbage Collector
---------------------

You can log the optional garbage collector module in Python. Notice that in CPython, most garbage collection is done using 
reference count. The garbage collector module is only responsible for the cycle reference. So this feature is mainly used
to detect cycle reference collection status, and the time consumed by running the optional garbage collector.

You can do this simply by:

.. code-block:: 

    viztracer --log_gc my_script.py

OR

.. code-block:: python

    tracer = VizTracer(log_gc=True)

Log Exit data
-------------

Normally VizTracer only logs the executed code in "execution phase", or "within exec() function". You can, however, log functions
in ``atexit`` or other on-exit hooks.

.. code-block::

    viztracer --log_exit my_script.py

Work with ``logging`` module
----------------------------

VizTracer can work with python builtin ``logging`` module by adding a handler to it. The report will show logging
data as Instant Events.

.. code-block:: python

    from viztracer import VizTracer
    from viztracer.vizlogging import VizLoggingHandler

    tracer = VizTracer()
    handler = VizLoggingHandler()
    handler.setTracer(tracer)
    # A handler is added to logging so logging will dump data to VizTracer
    logging.basicConfig(handlers = [handler])


================================================
FILE: docs/source/filter.rst
================================================
Filter
======

Sometimes, you may have too many data entries and you want to filter some of them out to either improve the performance or make the report clearer.
VizTracer provides multiple filters for your needs.

Min Duration
------------

You can ask VizTracer to only record entries that last longer than a period of time

.. code-block::

    viztracer --min_duration 0.2ms my_script.py

OR

.. code-block:: python

    tracer = VizTracer(min_duration=200)

Notice that with command line interface, ``viztracer`` expects a string representing a period of time,
which should be in format of ``<val><unit>``. ex. ``0.2ms``, ``300ns``, ``5.5us``. You can also omit
the unit and it would be parsed as ``us``, ex. ``0.5`` is the same as ``0.5us``.

But as an argument to ``VizTracer``, it should be a number of ``us``.

The default value of ``min_duration`` is ``0``, meaning every function entry is recorded.

Max Stack depth
---------------

You can limit maximum stack depth to trace by

.. code-block::

    viztracer --max_stack_depth 10 my_script.py

OR

.. code-block:: python

    tracer = VizTracer(max_stack_depth=10)

Include and Exclude Files
-------------------------

You can include only certain files/folders to trace by

.. code-block::

    # -- is used to resolve ambiguity
    viztracer --include_files ./src -- my_script.py

OR

.. code-block:: python

    tracer = VizTracer(include_files=["./src"])

Similarly, you can exclude certain files/folders to trace by

.. code-block::

    # -- is used to resolve ambiguity
    viztracer --exclude_files ./not_interested.py -- my_script.py

OR

.. code-block:: python

    tracer = VizTracer(exclude_files=["./not_interested.py"])

Notice this will have a significant negative impact on performance,
as VizTracer needs to check every function entry to see if it's in the list.

Ignore C Function
-----------------

By default, VizTracer will trace both python and C functions. You can turn off tracing C functions by

.. code-block::

    viztracer --ignore_c_function my_script.py

OR

.. code-block:: python

    tracer = VizTracer(ignore_c_function=True)

Since most of the builtin functions(like ``append`` or ``len``) are C functions which are frequently called,
ignoring C functions often improves the overhead and file size significantly.


Ignore Non File
---------------

You can ask VizTracer not to trace any functions that are not in a valid file(mostly import stuff) using ``ignore_frozen``

.. code-block::

    viztracer --ignore_frozen my_script.py

OR

.. code-block:: python

    tracer = VizTracer(ignore_frozen=True)


Ignore Function
---------------

It's possible that you want to ignore some arbitrary functions and their descendants. You can do it using ``@ignore_function`` decorator

.. code-block:: python

    from viztracer import ignore_function
    # This only works when there's a globally registered tracer
    @ignore_function
    def some_function():
        # nothing inside will be traced

.. _log_sparse_label:

Log Sparse
----------

You can make VizTracer log only certain functions using ``--log_sparse``. This is helpful when you are only interested in the time spent on
specific functions for a big picture on larger projects.

First, you need to add decorator ``@log_sparse`` on the function you want to log

.. code-block:: python

    from viztracer import log_sparse

    # @log_sparse will only log this function
    @log_sparse
    def function_you_want_to_log():
        # function body

    # @log_sparse(stack_depth=5) will log this function and its descendants
    # with a limit stack depth of 5
    # Nested @log_sparse with stack_depth won't work
    # (only the outermost function and its stack will be logged)
    @log_sparse(stack_depth=5)
    def function_you_want_to_log():
        # function body

    # Use dynamic_tracer_check=True if you use tracer as a context manager (or with %%viztracer).
    @log_sparse(dynamic_tracer_check=True)
    def function_you_want_to_log():
        # function body

    with VizTracer(log_sparse=True):
        function_you_want_to_log()

Then just call viztracer with ``--log_sparse``

.. code-block::

    viztracer --log_sparse your_script.py

When you are using ``--log_sparse``, due to the nature of the recording, some advanced features may not work with it.

You can leave ``@log_sparse`` as it is when you are not running the script with VizTracer. It will be like a no-op

If you want to log a piece of code, rather than a full function, please check :ref:`duration_event_label`. Duration Event
is compatible with ``log_sparse``

To use ``@log_sparse`` in conjunction with a context manager, you must define decorating functions within the created
context, or set the `dynamic_tracer_check=True`` argument of decorator. The second option leads to runtime checks,
so it increases the overhead.


================================================
FILE: docs/source/global_tracer.rst
================================================
Global Tracer Object
====================

Some features in VizTracer require a ``VizTracer`` object so it's helpful to make the tracer object accessible globally.

When you are using command line entry ``viztracer your_script.py``, you don't need to worry about it. The tracer will be
automatically registered and you can access it from any file. 

When you instantiate the ``VizTracer`` object like ``tracer = VizTracer()`` in your script, it will be automatically
registered globally. It is *not* recommended to have multiple tracer objects in a single script. However, you can turn off
the global register by ``tracer = VizTracer(register_global=False)``

To access the tracer, do

.. code-block:: python

    from viztracer import get_tracer
    # get_tracer() will return None if no tracer is registered
    tracer = get_tracer()

When you use ``VizLoggingHandler`` or ``VizCounter`` or ``VizObject``, setting their tracer to ``None`` will make 
the logging a ``NOP``. This will enable you to leave the instrumentation code as it is and run your program both
regularly and with ``viztracer``

You can do things like:

.. code-block:: python

    from viztracer import get_tracer
    from viztracer.vizlogging import VizLoggingHandler

    handler = VizLoggingHandler()

    handler.setTracer(get_tracer())

.. code-block:: python

    from viztracer import get_tracer
    from viztracer.vizobject import VizObject

    obj = VizObject(get_tracer(), "my variable")


================================================
FILE: docs/source/index.rst
================================================
.. VizTracer documentation master file, created by
   sphinx-quickstart on Sun Aug 23 11:51:08 2020.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.


Welcome to VizTracer's documentation!
=====================================

VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code to help you intuitively understand your code and figure out the time consuming part of your code.

VizTracer can display every function executed and the corresponding entry/exit time from the beginning of the program to the end, which is helpful for programmers to catch sporadic performance issues.

.. toctree::
   :maxdepth: 1
   :caption: Getting Started
   
   installation
   basic_usage
   global_tracer
   limitations

.. toctree::
   :maxdepth: 1
   :caption: Advanced Features
   
   filter
   custom_event_intro
   extra_log
   concurrency
   remote_attach
   plugins

.. toctree::
   :maxdepth: 1
   :caption: API Reference
   
   viztracer
   custom_event
   decorator
   viz_plugin

.. toctree::
   :maxdepth: 1
   :caption: About
   
   sponsor
   contact
   license



================================================
FILE: docs/source/installation.rst
================================================
Installation
============

VizTracer works with python 3.9+ on Linux/MacOs/Windows. No other dependency. For now, VizTracer only supports CPython.

The preferred way to install VizTracer is via pip

.. code-block::

    pip install viztracer

You can also install with conda

.. code-block::

    conda install conda-forge::viztracer

    // Or if you already have conda forge set up
    conda install viztracer


You can also download the source code and build it yourself.

Even though VizTracer functions without any other packages,
``orjson`` could improve the performance of json dump/load.

.. code-block::

    pip install orjson

Or you can install *full* version of viztracer:

.. code-block::

    pip install viztracer[full]


================================================
FILE: docs/source/license.rst
================================================
License
=======

Copyright 2020-2024 Tian Gao

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


================================================
FILE: docs/source/limitations.rst
================================================
Limitations
===========

VizTracer uses ``sys.setprofile()`` (before Python3.12) and ``sys.monitoring`` (after Python3.12) for its profiler capabilities,
so it will conflict with other profiling tools which also use these mechanisms. Be aware of it when using VizTracer

The clock resolution and latency on WSL1 are very `bad <https://github.com/microsoft/WSL/issues/77>`_, so if you are using WSL1, you may experience extra overhead.
There's no solution for it, except for upgrading to WSL2.

VizTracer, like other python tools that need to execute arbitrary code inside the module,
may conflict with code that check for top module or have other structural requirements.
For example, ``unittest.main()`` won't work if you use VizTracer from command line. 
There are ways to avoid it. You can use inline VizTracer, which will always work.
Or you can specify modules to ``unittest.main()``, which is not a general solution but could work without too much code changes.

If your code uses ``os._exit`` then VizTracer cannot save data before exiting. Consider using ``sys.exit`` instead.
See `this issue <https://github.com/gaogaotiantian/viztracer/issues/340>`_ for details.


================================================
FILE: docs/source/plugins.rst
================================================
Plugins
=======

VizTracer supports third party plugins that comply to the specification of VizTracer.

To use a plugin, you need to install the plugin first. For example, if you want to use
a plugin named ``vizplugins``

.. code-block::

    pip install vizplugins

Then you need to pass the plugin to ``viztracer`` using ``--plugins``

.. code-block::

    viztracer --plugins vizplugins -- my_script.py

There could be multiple plugins to use in a package, which are differentiate by modules.
You can specify the module where plugin lives(you should refer to the plugin's doc for
detailed usage)

.. code-block::

    viztracer --plugins vizplugins.cpu_time -- my_script.py

You can even pass arguments to the plugin, but you need double quotes to pack them
together.

.. code-block::

    viztracer --plugins "vizplugins.cpu_time -f 100" -- my_script.py

You can also do it inline, just pass the string or the plugin object itself in a list to VizTracer

.. code-block:: python

    tracer = VizTracer(plugins=["vizplugins.cpu_time"])
    # Or
    tracer = VizTracer(plugins=[vizplugins.CpuTimePlugin()])

    # To gracefully terminate all plugins, you need to do terminate
    tracer.terminate()

.. code-block:: python

    # You can use with statement to avoid explicitly terminate
    with VizTracer(plugins=["vizplugins.cpu_time"]):
        # Do your stuff here

If you want to develop your own plugin for VizTracer, take a look at :doc:`viz_plugin`


================================================
FILE: docs/source/remote_attach.rst
================================================
Remote Attach
=============

Attach
------

VizTracer supports remote attach so you don't need to start the process with VizTracer.
This is helpful when you don't want to restart the process to trace it. You can run
the process once and forever, and only attach VizTracer when you want to trace it.
The process will run normally without performance hit when you are not attaching VizTracer.

**This feature does not support Windows**

To attach to the process and trace it, you have two ways:

1. You can attach to an arbitrary Python process, as long as ``viztracer`` is importable in that process
2. You can attach to a Python process that already installed VizTracer

The **first** way is more flexible - it will inject code into the process to load ``viztracer``. You can even pass
arguments from ``viztracer`` command line.

.. code-block::

    viztracer --attach <pid> -o result.json

**viztracer has to be importable in the attached process otherwise it will raise an exception**

This means, you need to install ``viztracer`` in the environment(venv, pyenv etc.) of the attached process. You don't have
to use the ``viztracer`` from the same environment to attach though.

**gdb is required on Linux, and lldb is required on MacOS**

Notice that, if there is already a globally registered ``VizTracer`` object in the attached process,
that object will be used for tracing. If it's already running, then attaching won't do anything.
Otherwise all the arguments will be sent to the attached process to instantiate a ``VizTracer`` object.

By default, you need to Ctrl+C out of viztracer to save the report. Be aware that it is
the attached process rather than attaching process(viztracer) that is saving the report,
so it's the attached process's resource that is being spent.

You can also trace for a period of time using ``-t``

.. code-block::

    viztracer --attach <pid> -t <seconds>

Even though this looks decent, there are some dark magic going under the rug and you may want to do
something cleaner, which brings up the **second** way - pre-install viztracer in the process you want to profile.
Another good thing about this way is that it's thread-aware. Even if you attach after spawning threads,
you can still get profile data from the other threads.

.. code-block:: python

    from viztracer import VizTracer
    tracer = VizTracer()
    tracer.install()

``tracer.install()`` will basically add handlers for ``SIGUSR1`` and ``SIGUSR2`` which
are only available on Unix. This also requires the program not to use these two signals.

Then when you are running this process, you can attach to it with VizTracer, using it's pid

.. code-block::

    viztracer --attach_installed <pid>
    
If you need other options, you should specify them in ``VizTracer`` instance in attached process.

Uninstall
---------

There could be time when you want to "uninstall" VizTracer from a process. For example, for some
reason, the attach process failed and VizTracer is left on in the process. You can do that
with:

.. code-block::

    viztracer --uninstall <pid>


================================================
FILE: docs/source/sponsor.rst
================================================
Sponsor
=======

If you find VizTracer useful and would like to support its development, please consider
`sponsoring <https://github.com/sponsors/gaogaotiantian>`_ the project.
Your support will help ensure that VizTracer continues to improve and evolve.

Thank you to our current sponsors:

.. raw:: html

    <a href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=viztracer" target="_blank">
        <img src="https://assets.testmu.ai/resources/images/logos/black-logo.png" style="vertical-align: middle;" width="200" />
    </a>


================================================
FILE: docs/source/viz_plugin.rst
================================================
VizPlugin
=========

In this doc, we will show how to build your own plugin for VizTracer.

Every plugin should inherit ``VizPluginBase`` from ``viztracer.vizplugin``

.. py:class:: VizPluginBase(self)

    .. py:method:: support_version(self)

        :return: the string for the latest version of viztracer supported to have API compatibility
        :rtype: dict

        You must have this method overloaded and return the version, otherwise viztracer
        will raise an exception

        .. code-block:: python

            def support_version(self):
                return "0.11.0"

    .. py:method:: message(self, m_type, payload)

        :param str m_type: type of message
        :param dict payload: a very flexible payload with the message
        :return: the corresponding return value. Could be an action, or a respond.
        :rtype: dict

        As of now, ``message()`` only supports two kinds of ``m_type`` - ``"event"`` and ``"command"``.

        ``"event"`` has a ``payload`` that has key ``"when"``, to indicate when the event happens. 

        ``"when"`` could be ``initialize``, ``pre-start``, ``post-stop`` or ``pre-save``.

        When ``"event"`` type message is received, the plugin can return an action, with key ``"action"`` set to the
        action it needs. For now the only one supported is ``"handle_data"``, with which you also
        needs to provide a data handler ``"handler"``

        return ``{}`` if you don't want to do anything

        ``"command"`` has a payload that has key ``"cmd_type"``, to indicate what VizTracer expects the plugin to do.

        ``"cmd_type"`` could only be ``"terminate"`` for now. ``"terminate"`` command is guaranteed before viztracer exits
        when commandline interface is used. However, if you are using viztracer inline, you will have to explicitly run
        ``tracer.terminate()`` unless you are using ``with VizTracer()``.

        When ``"command"`` type message is received, the plugin has to return a dict like ``{"success": True}`` to 
        inform VizTracer that the plugin received the command and did what it asked.

        .. code-block::python

            def message(self, m_type, payload):
                if m_type == "event":
                    if payload["when"] == "pre-start":
                        self.do_something()
                    elif payload["when"] == "pre-save":
                        return({"action":"handle_data", "handler", self.handler})
                elif m_type == "command":
                    if payload["cmd_type"] == "terminate":
                        # release all the resources here
                        return({"success": True})
                
                return {}

Possible Actions
----------------

This sections lists all the possible actions you can take after you received an event. You should
return ``{"action": "the action name" ...}`` with specific payload for each action

``"handle_data"``

When you want to modify the data, which is a common way to change the result viztracer has, you need
to use ``"handle_data"`` action.

You should return ``{"action": "handle_data", "handler": my_handler}`` where ``my_handler`` should be
a function with a prototype ``def my_handler(data)``. VizTracer will call this handler to modify the
original data before it saves the report

Make Your Plugin Accessible
---------------------------

You will also need a magic function defined to enable VizTracer to load your plugins from command line.
The function has to be named ```get_vizplugin(arg)```, which will return an instance of your plugin object
based on the arg given when it's called. You also need to put this function in the module that you want 
your use to use on command line.

For example, if I want my user to use my plugin as ``viztracer --plugins vizplugins -- my_script.py``, I
should put ``get_vizplugin()`` function in ``vizplugins/__init__.py``. Or if I want them to use as 
``viztracer --plugins vizplugins.cpu_usage -- my_script.py``, I should put the function in
``vizplugins/cpu_usage.py``

Be aware that **arg is an unparsed string** like "vizplugins.cpu_time f 100". You can split it yourself
and parse it the way you like. Or you can specify something special for your own plugin


================================================
FILE: docs/source/viztracer.rst
================================================
VizTracer
=========

.. py:class:: VizTracer(self,\
                 tracer_entries=1000000,\
                 verbose=1,\
                 max_stack_depth=-1,\
                 include_files=None,\
                 exclude_files=None,\
                 ignore_c_function=False,\
                 ignore_frozen=False,\
                 log_func_retval=False,\
                 log_func_args=False,\
                 log_func_repr=None,\
                 log_func_with_objprint=None,\
                 log_print=False,\
                 log_gc=False,\
                 log_sparse=False,\
                 log_async=False,\
                 log_torch=False,\
                 log_audit=False,\
                 pid_suffix=False,\
                 file_info=True,\
                 register_global=True,\
                 trace_self=False,\
                 min_duration=0,\
                 minimize_memory=False,\
                 dump_raw=False,\
                 sanitize_function_name=False,\
                 process_name=None,\
                 output_file="result.json",\
                 plugins=None)

    .. py:attribute:: tracer_entries
        :type: int
        :value: 1000000

        Size of circular buffer. The user can only specify this value when instantiate ``VizTracer`` object or if they use command line

        Please be aware that a larger number of entries also means more disk space, RAM usage and loading time. Be familiar with your computer's limit.

        ``tracer_entries`` means how many entries ``VizTracer`` can store. It's not a byte number.

        .. code-block::

            viztracer --tracer_entries 500000

    .. py:attribute:: verbose
        :type: int
        :value: 1

        Verbose level of VizTracer. Can be set to ``0`` so it won't print anything while tracing 

        Setting it to ``0`` is equivalent to 

        .. code-block::

            viztracer --quiet

    .. py:attribute:: max_stack_depth
        :type: int
        :value: -1

        Specify the maximum stack depth VizTracer will trace. ``-1`` means infinite.

        Equivalent to 

        .. code-block::

            viztracer --max_stack_depth <val>
    
    .. py:attribute:: include_files
        :type: Optional[list[str]]
        :value: None

        Specify the files or folders that VizTracer will trace. If it's not empty, VizTracer will function in whitelist mode, any files/folders not included will be ignored.
        
        Because converting code filename in tracer is too expensive, we will only compare the input and its absolute path against code filename, which could be a relative path. That means, if you run your program using relative path, but gives the ``include_files`` an absolute path, it will not be able to detect.

        Can't be set with ``exclude_files``

        Equivalent to 

        .. code-block::

            viztracer --include_files file1[ file2 [file3 ...]]

        **NOTICE**

        In command line, ``--include_files`` takes multiple arguments, which will be ambiguous about the command that actually needs to run, so you need to explicitly specify command using ``--``

        .. code-block::

            viztracer --include_files file1 file2 -- my_scrpit.py

    .. py:attribute:: exclude_files
        :type: Optional[list[str]]
        :value: None

        Specify the files or folders that VizTracer will not trace. If it's not empty, VizTracer will function in blacklist mode, any files/folders not included will be ignored.

        Because converting code filename in tracer is too expensive, we will only compare the input and its absolute path against code filename, which could be a relative path. That means, if you run your program using relative path, but gives the ``exclude_files`` an absolute path, it will not be able to detect.

        Can't be set with ``include_files``

        Equivalent to 

        .. code-block::

            viztracer --exclude_files file1[ file2 [file3 ...]]
        
        **NOTICE**

        In command line, ``--exclude_files`` takes multiple arguments, which will be ambiguous about the command that actually needs to run, so you need to explicitly specify command using ``--``

        .. code-block::

            viztracer --exclude_files file1 file2 -- my_scrpit.py

    .. py:attribute:: ignore_c_function
        :type: bool
        :value: False

        Whether trace c function

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --ignore_c_function

    .. py:attribute:: ignore_frozen
        :type: bool
        :value: False

        Whether trace functions from frozen functions(mostly import stuff)

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --ignore_frozen

    .. py:attribute:: log_func_retval 
        :type: bool
        :value: False

        Whether log the return value of the function as string in report entry

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_func_retval
    
    .. py:attribute:: log_func_args 
        :type: bool
        :value: False

        Whether log the arguments of the function as string in report entry

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_func_args

    .. py:attribute:: log_func_repr
        :type: Optional[Callable[..., str]]
        :value: None

        A custom repr function to log the function arguments and return value. The function should take
        a single argument and return a string.

    .. py:attribute:: log_func_with_objprint
        :type: bool
        :value: False

        Whether log the arguments and return value of the function with ``objprint``.
        This attribute can't be ``True`` if ``log_func_repr`` is given.

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_func_with_objprint
    
    .. py:attribute:: log_print 
        :type: bool
        :value: False

        Whether replace the ``print`` function to log in VizTracer report

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_print

    .. py:attribute:: log_gc 
        :type: bool
        :value: False

        Whether log garbage collector

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_gc

    .. py:attribute:: log_sparse
        :type: bool
        :value: False

        Whether initialize the tracer in ``log_sparse`` mode. In this mode, the tracer
        will start as a context.

        This option should be used when you are using inline tracing with ``@log_sparse``

    .. py:attribute:: log_async
        :type: bool
        :value: False

        Whether log async tasks as separate "thread" in vizviewer

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_async

    .. py:attribute:: log_torch
        :type: bool
        :value: False

        Whether log native torch events

        Setting it to ``True`` is equivalent to 

        .. code-block::

            viztracer --log_torch

    .. py:attribute:: log_audit
        :type: Optional[Sequence[str]]
        :value: None

        The audit events to log.

        Equivalent to

        .. code-block::

            viztracer --log_audit event1[ event2 [event3 ...]]

    .. py:attribute:: pid_suffix
        :type: bool
        :value: False

        Whether append pid to the output file name.

        Equivalent to

        .. code-block::

            viztracer --pid_suffix

    .. py:attribute:: file_info
        :type: bool
        :value: False

        Whether save the file_info in the report.
    
    .. py:attribute:: register_global
        :type: bool
        :value: True
        
        whether register the tracer globally, so every file can use ``get_tracer()`` to get this tracer. When command line
        entry is used, the tracer will be automatically registered. When ``VizTracer()`` is manually instantiated, it will
        be registered as well by default. 
        
        Some functions may require a globally registered tracer to work.

        This attribute will only be effective when the object is initialized:

        .. code-block:: python

            tracer = VizTracer(register_global=False)

    .. py:attribute:: trace_self
        :type: bool
        :value: False
        
        whether trace the function calls of the tracer itself.

    .. py:attribute:: min_duration
        :type: float
        :value: 0

        Minimum duration of a function to be logged. The value is in unit of ``us``.

    .. py:attribute:: minimize_memory
        :type: bool
        :value: False

        Whether make effort to minimize the RAM usage when dumping the data.

    .. py:attribute:: dump_raw
        :type: bool
        :value: False

        Whether use the raw dump for json report. This is usually faster because it
        dumps directly in C.

    .. py:attribute:: sanitize_function_name
        :type: bool
        :value: False

        Whether check the function name before dump. This is useful for dymanically
        generated PyMethodDef.

    .. py:attribute:: process_name
        :type: Optional[str]
        :value: None

        The process name to display in the report.

    .. py:attribute:: output_file
        :type: string
        :value: "result.json"

        Default file path to write report

        Equivalent to 

        .. code-block::

            viztracer -o <filepath>

    .. py:attribute:: plugins
        :type: Optional[Sequence[Union[VizPluginBase, str]]]
        :value: None

        List of plugins to use.
    
    .. py:method:: run(command, output_file=None)

        run ``command`` and save report to ``output_file``
    
    .. py:method:: save(output_file=None, file_info=None, verbose=None)

        parse data and save report to ``output_file``. If ``output_file`` is ``None``, save to default path.
    
    .. py:method:: start()

        start tracing

    .. py:method:: stop(stop_option=None)

        stop tracing. The only valid value for ``stop_option`` is ``"flush_as_finish"``. When
        defined, VizTracer will log all the unfinished functions.

    .. py:method:: clear()

        clear all the collected data

    .. py:method:: parse()

        parse the data collected, return number of total entries

    .. py:method:: enable_thread_tracing()

        Not needed on Python3.12+.

        enable tracing in the current thread, useful when you use multi-thread without builtin threading module

    .. py:method:: add_variable(name, var, event="instant")

        :param str name: name of this variable
        :param object var: variable to be added
        :param str event: one of ``instant`` or ``counter``

        Add variable to the report. ``event`` determines the logging type.

    .. py:method:: add_instant(name, args, scope="g")
        
        :param str name: name of this instant event
        :param object args: the arguments of this instant event
        :param str scope: one of ``"g"``, ``"p"`` or ``"t"`` for global, process or thread level event

        Add instant event to the report.

    .. py:method:: add_counter(name, args)
        
        :param str name: name of this counter event
        :param object args: the arguments of this counter event

        Add counter event to the report.

    .. py:method:: add_raw(raw)
        
        :param object raw: the raw chrome trace event to add to the report

        Add a raw event to the report.

    .. py:method:: add_func_args(name, key, value)
        
        :param str key: key to display in the report
        :param object value: a jsonifiable object

        This method allows you to attach args to the current function, which will show in the report when you click on the function 

    .. py:method:: log_event(event_name)

        :param str event_name: name of this event that will appear in the result
        :return: VizEvent object that should only be used with ``with`` statement
        :rtype: VizEvent

        .. code-block:: python

            with get_tracer().log_event("event name"):
                # some code here

    .. py:method:: set_afterfork(callback, *args, **kwargs)

        :param callable callback: the callback function after fork, should take a ``VizTracer`` object as the first argument
        :param list args: positional arguments to ``callback``
        :param dict kwargs: keyword arguments to ``callback``

        This method will register a callback function after the process is forked. If you want different behavior on child
        processes with ``multiprocessing``, you can utilize this method

        Notice that the ``callback`` argument should be a ``callable`` that takes a ``VizTracer`` object as the first argument

        .. code-block:: python

            from viztracer import get_tracer

            def afterfork_callback(tracer):
                tracer.max_stack_depth = 10
            
            get_tracer().set_afterfork(afterfork_callback)

    .. py:method:: getts()

        :return: current timestamp in us
        :rtype: int

        Get current timestamp in us

    .. py:method:: get_base_time()

        :return: the base time of the tracer in ns
        :rtype: int

        Get the base time of the tracer


================================================
FILE: example/generate_examples.py
================================================
import os
import subprocess


def generate_by_script(script):
    file_path = os.path.join(os.path.dirname(__file__), "src", script)
    subprocess.run(["python", file_path])


def generate_by_vt(script, options):
    file_path = os.path.join(os.path.dirname(__file__), "src", script)
    output_file = os.path.join(
        os.path.dirname(__file__), "json", script.replace("py", "json")
    )
    subprocess.run(
        ["viztracer"] + options + ["-o", output_file, "--file_info", file_path]
    )


if __name__ == "__main__":
    vt_options = {
        "mcts_game": ["--log_gc"],
        "logging_integration": ["--include_files", os.path.dirname(__file__)],
        "multi_process_pool": ["--log_multiprocess"],
        "async_simple": ["--log_async"],
    }
    for script in os.listdir(os.path.join(os.path.dirname(__file__), "src")):
        if script.split(".")[0] in vt_options:
            options = vt_options[script.split(".")[0]]
            generate_by_vt(script, options)
        elif script.endswith(".py"):
            generate_by_script(script)


================================================
FILE: example/json/async_simple.json
================================================
{"traceEvents": [{"ph": "M", "pid": 222311, "tid": 222311, "name": "process_name", "args": {"name": "MainProcess"}}, {"ph": "M", "pid": 222311, "tid": 222311, "name": "thread_name", "args": {"name": "MainThread"}}, {"pid": 222311, "tid": 222311, "ts": 81995533209.122, "ph": "X", "cat": "fee", "dur": 1.839, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533212.403, "ph": "X", "cat": "fee", "dur": 1.741, "name": "Runner.__init__ (/usr/lib/python3.12/asyncio/runners.py:48)"}, {"pid": 222311, "tid": 222311, "ts": 81995533221.238, "ph": "X", "cat": "fee", "dur": 0.255, "name": "str.rpartition"}, {"pid": 222311, "tid": 222311, "ts": 81995533220.763, "ph": "X", "cat": "fee", "dur": 0.995, "name": "ModuleSpec.parent (<frozen importlib._bootstrap>:645)"}, {"pid": 222311, "tid": 222311, "ts": 81995533223.558, "ph": "X", "cat": "fee", "dur": 0.1, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533223.94, "ph": "X", "cat": "fee", "dur": 0.234, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995533223.252, "ph": "X", "cat": "fee", "dur": 1.053, "name": "_handle_fromlist (<frozen importlib._bootstrap>:1390)"}, {"pid": 222311, "tid": 222311, "ts": 81995533226.348, "ph": "X", "cat": "fee", "dur": 3.322, "name": "BaseDefaultEventLoopPolicy.__init__ (/usr/lib/python3.12/asyncio/events.py:671)"}, {"pid": 222311, "tid": 222311, "ts": 81995533225.183, "ph": "X", "cat": "fee", "dur": 4.744, "name": "_UnixDefaultEventLoopPolicy.__init__ (/usr/lib/python3.12/asyncio/unix_events.py:1446)"}, {"pid": 222311, "tid": 222311, "ts": 81995533230.164, "ph": "X", "cat": "fee", "dur": 0.204, "name": "_thread.lock.__exit__"}, {"pid": 222311, "tid": 222311, "ts": 81995533218.789, "ph": "X", "cat": "fee", "dur": 11.68, "name": "_init_event_loop_policy (/usr/lib/python3.12/asyncio/events.py:775)"}, {"pid": 222311, "tid": 222311, "ts": 81995533218.126, "ph": "X", "cat": "fee", "dur": 12.426, "name": "get_event_loop_policy (/usr/lib/python3.12/asyncio/events.py:783)"}, {"pid": 222311, "tid": 222311, "ts": 81995533238.336, "ph": "X", "cat": "fee", "dur": 3.55, "name": "time.get_clock_info"}, {"pid": 222311, "tid": 222311, "ts": 81995533250.164, "ph": "X", "cat": "fee", "dur": 0.108, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533250.533, "ph": "X", "cat": "fee", "dur": 0.323, "name": "str.encode"}, {"pid": 222311, "tid": 222311, "ts": 81995533250.006, "ph": "X", "cat": "fee", "dur": 0.986, "name": "_createenviron.<locals>.encode (<frozen os>:762)"}, {"pid": 222311, "tid": 222311, "ts": 81995533249.076, "ph": "X", "cat": "fee", "dur": 3.316, "name": "_Environ.__getitem__ (<frozen os>:680)"}, {"pid": 222311, "tid": 222311, "ts": 81995533246.972, "ph": "X", "cat": "fee", "dur": 6.298, "name": "Mapping.get (<frozen _collections_abc>:804)"}, {"pid": 222311, "tid": 222311, "ts": 81995533244.493, "ph": "X", "cat": "fee", "dur": 8.972, "name": "_is_debug_mode (/usr/lib/python3.12/asyncio/coroutines.py:10)"}, {"pid": 222311, "tid": 222311, "ts": 81995533254.84, "ph": "X", "cat": "fee", "dur": 0.273, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995533253.974, "ph": "X", "cat": "fee", "dur": 1.211, "name": "BaseEventLoop.set_debug (/usr/lib/python3.12/asyncio/base_events.py:2008)"}, {"pid": 222311, "tid": 222311, "ts": 81995533257.855, "ph": "X", "cat": "fee", "dur": 1.281, "name": "WeakSet.__init__ (/usr/lib/python3.12/_weakrefset.py:37)"}, {"pid": 222311, "tid": 222311, "ts": 81995533234.716, "ph": "X", "cat": "fee", "dur": 25.042, "name": "BaseEventLoop.__init__ (/usr/lib/python3.12/asyncio/base_events.py:411)"}, {"pid": 222311, "tid": 222311, "ts": 81995533264.994, "ph": "X", "cat": "fee", "dur": 0.801, "name": "_SelectorMapping.__init__ (/usr/lib/python3.12/selectors.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995533263.539, "ph": "X", "cat": "fee", "dur": 2.465, "name": "_BaseSelectorImpl.__init__ (/usr/lib/python3.12/selectors.py:209)"}, {"pid": 222311, "tid": 222311, "ts": 81995533262.213, "ph": "X", "cat": "fee", "dur": 7.259, "name": "_PollLikeSelector.__init__ (/usr/lib/python3.12/selectors.py:347)"}, {"pid": 222311, "tid": 222311, "ts": 81995533275.534, "ph": "X", "cat": "fee", "dur": 0.376, "name": "_thread.RLock.acquire"}, {"pid": 222311, "tid": 222311, "ts": 81995533274.834, "ph": "X", "cat": "fee", "dur": 1.17, "name": "_acquireLock (/usr/lib/python3.12/logging/__init__.py:234)"}, {"pid": 222311, "tid": 222311, "ts": 81995533276.932, "ph": "X", "cat": "fee", "dur": 0.361, "name": "Manager.disable (/usr/lib/python3.12/logging/__init__.py:1369)"}, {"pid": 222311, "tid": 222311, "ts": 81995533278.192, "ph": "X", "cat": "fee", "dur": 1.04, "name": "Logger.getEffectiveLevel (/usr/lib/python3.12/logging/__init__.py:1776)"}, {"pid": 222311, "tid": 222311, "ts": 81995533280.026, "ph": "X", "cat": "fee", "dur": 0.102, "name": "_thread.RLock.release"}, {"pid": 222311, "tid": 222311, "ts": 81995533279.909, "ph": "X", "cat": "fee", "dur": 0.256, "name": "_releaseLock (/usr/lib/python3.12/logging/__init__.py:243)"}, {"pid": 222311, "tid": 222311, "ts": 81995533272.957, "ph": "X", "cat": "fee", "dur": 7.349, "name": "Logger.isEnabledFor (/usr/lib/python3.12/logging/__init__.py:1790)"}, {"pid": 222311, "tid": 222311, "ts": 81995533271.757, "ph": "X", "cat": "fee", "dur": 8.658, "name": "Logger.debug (/usr/lib/python3.12/logging/__init__.py:1517)"}, {"pid": 222311, "tid": 222311, "ts": 81995533283.624, "ph": "X", "cat": "fee", "dur": 7.351, "name": "_socket.socketpair"}, {"pid": 222311, "tid": 222311, "ts": 81995533291.617, "ph": "X", "cat": "fee", "dur": 0.174, "name": "_socket.socket.detach"}, {"pid": 222311, "tid": 222311, "ts": 81995533292.522, "ph": "X", "cat": "fee", "dur": 3.416, "name": "socket.__init__ (/usr/lib/python3.12/socket.py:221)"}, {"pid": 222311, "tid": 222311, "ts": 81995533296.307, "ph": "X", "cat": "fee", "dur": 0.044, "name": "_socket.socket.detach"}, {"pid": 222311, "tid": 222311, "ts": 81995533296.496, "ph": "X", "cat": "fee", "dur": 1.058, "name": "socket.__init__ (/usr/lib/python3.12/socket.py:221)"}, {"pid": 222311, "tid": 222311, "ts": 81995533282.903, "ph": "X", "cat": "fee", "dur": 14.803, "name": "socketpair (/usr/lib/python3.12/socket.py:596)"}, {"pid": 222311, "tid": 222311, "ts": 81995533298.865, "ph": "X", "cat": "fee", "dur": 0.632, "name": "socket.setblocking"}, {"pid": 222311, "tid": 222311, "ts": 81995533299.717, "ph": "X", "cat": "fee", "dur": 0.156, "name": "socket.setblocking"}, {"pid": 222311, "tid": 222311, "ts": 81995533300.528, "ph": "X", "cat": "fee", "dur": 0.145, "name": "socket.fileno"}, {"pid": 222311, "tid": 222311, "ts": 81995533302.26, "ph": "X", "cat": "fee", "dur": 0.09, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995533304.552, "ph": "X", "cat": "fee", "dur": 1.056, "name": "_contextvars.copy_context"}, {"pid": 222311, "tid": 222311, "ts": 81995533307.123, "ph": "X", "cat": "fee", "dur": 0.215, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995533303.867, "ph": "X", "cat": "fee", "dur": 3.598, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995533310.085, "ph": "X", "cat": "fee", "dur": 0.229, "name": "_BaseSelectorImpl.get_map (/usr/lib/python3.12/selectors.py:272)"}, {"pid": 222311, "tid": 222311, "ts": 81995533312.86, "ph": "X", "cat": "fee", "dur": 0.122, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533312.464, "ph": "X", "cat": "fee", "dur": 0.736, "name": "_fileobj_to_fd (/usr/lib/python3.12/selectors.py:21)"}, {"pid": 222311, "tid": 222311, "ts": 81995533311.408, "ph": "X", "cat": "fee", "dur": 1.849, "name": "_BaseSelectorImpl._fileobj_lookup (/usr/lib/python3.12/selectors.py:215)"}, {"pid": 222311, "tid": 222311, "ts": 81995533314.016, "ph": "X", "cat": "fee", "dur": 0.761, "name": "str.format"}, {"pid": 222311, "tid": 222311, "ts": 81995533310.815, "ph": "X", "cat": "fee", "dur": 4.319, "name": "_SelectorMapping.__getitem__ (/usr/lib/python3.12/selectors.py:69)"}, {"pid": 222311, "tid": 222311, "ts": 81995533315.436, "ph": "X", "cat": "fee", "dur": 0.266, "name": "str.format"}, {"pid": 222311, "tid": 222311, "ts": 81995533309.592, "ph": "X", "cat": "fee", "dur": 6.446, "name": "BaseSelector.get_key (/usr/lib/python3.12/selectors.py:180)"}, {"pid": 222311, "tid": 222311, "ts": 81995533318.997, "ph": "X", "cat": "fee", "dur": 0.053, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533318.785, "ph": "X", "cat": "fee", "dur": 0.397, "name": "_fileobj_to_fd (/usr/lib/python3.12/selectors.py:21)"}, {"pid": 222311, "tid": 222311, "ts": 81995533318.668, "ph": "X", "cat": "fee", "dur": 0.561, "name": "_BaseSelectorImpl._fileobj_lookup (/usr/lib/python3.12/selectors.py:215)"}, {"pid": 222311, "tid": 222311, "ts": 81995533320.43, "ph": "X", "cat": "fee", "dur": 0.316, "name": "type.__new__"}, {"pid": 222311, "tid": 222311, "ts": 81995533320.086, "ph": "X", "cat": "fee", "dur": 0.769, "name": "<lambda> (<string>:1)"}, {"pid": 222311, "tid": 222311, "ts": 81995533318.173, "ph": "X", "cat": "fee", "dur": 3.529, "name": "_BaseSelectorImpl.register (/usr/lib/python3.12/selectors.py:234)"}, {"pid": 222311, "tid": 222311, "ts": 81995533322.844, "ph": "X", "cat": "fee", "dur": 3.102, "name": "select.epoll.register"}, {"pid": 222311, "tid": 222311, "ts": 81995533317.145, "ph": "X", "cat": "fee", "dur": 8.869, "name": "_PollLikeSelector.register (/usr/lib/python3.12/selectors.py:351)"}, {"pid": 222311, "tid": 222311, "ts": 81995533301.742, "ph": "X", "cat": "fee", "dur": 24.775, "name": "BaseSelectorEventLoop._add_reader (/usr/lib/python3.12/asyncio/selector_events.py:278)"}, {"pid": 222311, "tid": 222311, "ts": 81995533281.629, "ph": "X", "cat": "fee", "dur": 45.063, "name": "BaseSelectorEventLoop._make_self_pipe (/usr/lib/python3.12/asyncio/selector_events.py:118)"}, {"pid": 222311, "tid": 222311, "ts": 81995533330.267, "ph": "X", "cat": "fee", "dur": 0.237, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995533331.141, "ph": "X", "cat": "fee", "dur": 0.11, "name": "dict.items"}, {"pid": 222311, "tid": 222311, "ts": 81995533331.476, "ph": "X", "cat": "fee", "dur": 0.054, "name": "dict.items"}, {"pid": 222311, "tid": 222311, "ts": 81995533329.953, "ph": "X", "cat": "fee", "dur": 1.702, "name": "WeakValueDictionary.update (/usr/lib/python3.12/weakref.py:289)"}, {"pid": 222311, "tid": 222311, "ts": 81995533328.022, "ph": "X", "cat": "fee", "dur": 3.892, "name": "WeakValueDictionary.__init__ (/usr/lib/python3.12/weakref.py:104)"}, {"pid": 222311, "tid": 222311, "ts": 81995533233.243, "ph": "X", "cat": "fee", "dur": 99.07, "name": "BaseSelectorEventLoop.__init__ (/usr/lib/python3.12/asyncio/selector_events.py:59)"}, {"pid": 222311, "tid": 222311, "ts": 81995533231.945, "ph": "X", "cat": "fee", "dur": 100.696, "name": "_UnixSelectorEventLoop.__init__ (/usr/lib/python3.12/asyncio/unix_events.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995533230.974, "ph": "X", "cat": "fee", "dur": 101.789, "name": "BaseDefaultEventLoopPolicy.new_event_loop (/usr/lib/python3.12/asyncio/events.py:714)"}, {"pid": 222311, "tid": 222311, "ts": 81995533217.431, "ph": "X", "cat": "fee", "dur": 115.402, "name": "new_event_loop (/usr/lib/python3.12/asyncio/events.py:821)"}, {"pid": 222311, "tid": 222311, "ts": 81995533333.646, "ph": "X", "cat": "fee", "dur": 0.147, "name": "get_event_loop_policy (/usr/lib/python3.12/asyncio/events.py:783)"}, {"pid": 222311, "tid": 222311, "ts": 81995533335.814, "ph": "X", "cat": "fee", "dur": 0.1, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533335.088, "ph": "X", "cat": "fee", "dur": 1.041, "name": "BaseDefaultEventLoopPolicy.set_event_loop (/usr/lib/python3.12/asyncio/events.py:707)"}, {"pid": 222311, "tid": 222311, "ts": 81995533334.348, "ph": "X", "cat": "fee", "dur": 1.893, "name": "_UnixDefaultEventLoopPolicy.set_event_loop (/usr/lib/python3.12/asyncio/unix_events.py:1458)"}, {"pid": 222311, "tid": 222311, "ts": 81995533333.519, "ph": "X", "cat": "fee", "dur": 2.775, "name": "set_event_loop (/usr/lib/python3.12/asyncio/events.py:816)"}, {"pid": 222311, "tid": 222311, "ts": 81995533336.507, "ph": "X", "cat": "fee", "dur": 0.125, "name": "_contextvars.copy_context"}, {"pid": 222311, "tid": 222311, "ts": 81995533216.111, "ph": "X", "cat": "fee", "dur": 120.799, "name": "Runner._lazy_init (/usr/lib/python3.12/asyncio/runners.py:131)"}, {"pid": 222311, "tid": 222311, "ts": 81995533215.072, "ph": "X", "cat": "fee", "dur": 121.937, "name": "Runner.__enter__ (/usr/lib/python3.12/asyncio/runners.py:57)"}, {"pid": 222311, "tid": 222311, "ts": 81995533340.62, "ph": "X", "cat": "fee", "dur": 0.068, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533340.8, "ph": "X", "cat": "fee", "dur": 0.093, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533341.317, "ph": "X", "cat": "fee", "dur": 0.123, "name": "set.add"}, {"pid": 222311, "tid": 222311, "ts": 81995533339.895, "ph": "X", "cat": "fee", "dur": 1.644, "name": "iscoroutine (/usr/lib/python3.12/asyncio/coroutines.py:32)"}, {"pid": 222311, "tid": 222311, "ts": 81995533341.778, "ph": "X", "cat": "fee", "dur": 0.261, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533342.218, "ph": "X", "cat": "fee", "dur": 0.335, "name": "Runner._lazy_init (/usr/lib/python3.12/asyncio/runners.py:131)"}, {"pid": 222311, "tid": 222311, "ts": 81995533344.122, "ph": "X", "cat": "fee", "dur": 0.081, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995533347.188, "ph": "X", "cat": "fee", "dur": 0.058, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995533348.926, "ph": "X", "cat": "fee", "dur": 0.055, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995533350.674, "ph": "X", "cat": "fee", "dur": 0.042, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995533350.229, "ph": "X", "cat": "fee", "dur": 0.577, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995533352.478, "ph": "X", "cat": "fee", "dur": 0.101, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995533349.702, "ph": "X", "cat": "fee", "dur": 2.956, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995533348.766, "ph": "X", "cat": "fee", "dur": 4.005, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995533354.134, "ph": "X", "cat": "fee", "dur": 0.27, "name": "set.add"}, {"pid": 222311, "tid": 222311, "ts": 81995533353.498, "ph": "X", "cat": "fee", "dur": 0.961, "name": "WeakSet.add (/usr/lib/python3.12/_weakrefset.py:85)"}, {"pid": 222311, "tid": 222311, "ts": 81995533343.844, "ph": "X", "cat": "fee", "dur": 11.534, "name": "BaseEventLoop.create_task (/usr/lib/python3.12/asyncio/base_events.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995533356.032, "ph": "X", "cat": "fee", "dur": 0.092, "name": "_thread.get_ident"}, {"pid": 222311, "tid": 222311, "ts": 81995533355.799, "ph": "X", "cat": "fee", "dur": 0.557, "name": "current_thread (/usr/lib/python3.12/threading.py:1483)"}, {"pid": 222311, "tid": 222311, "ts": 81995533356.848, "ph": "X", "cat": "fee", "dur": 0.369, "name": "main_thread (/usr/lib/python3.12/threading.py:1629)"}, {"pid": 222311, "tid": 222311, "ts": 81995533359.188, "ph": "X", "cat": "fee", "dur": 0.39, "name": "_signal.getsignal"}, {"pid": 222311, "tid": 222311, "ts": 81995533360.382, "ph": "X", "cat": "fee", "dur": 0.1, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533360.163, "ph": "X", "cat": "fee", "dur": 0.381, "name": "_int_to_enum (/usr/lib/python3.12/signal.py:24)"}, {"pid": 222311, "tid": 222311, "ts": 81995533358.441, "ph": "X", "cat": "fee", "dur": 2.155, "name": "getsignal (/usr/lib/python3.12/signal.py:62)"}, {"pid": 222311, "tid": 222311, "ts": 81995533362.666, "ph": "X", "cat": "fee", "dur": 0.268, "name": "_enum_to_int (/usr/lib/python3.12/signal.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995533363.036, "ph": "X", "cat": "fee", "dur": 2.385, "name": "_enum_to_int (/usr/lib/python3.12/signal.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995533365.508, "ph": "X", "cat": "fee", "dur": 1.636, "name": "_signal.signal"}, {"pid": 222311, "tid": 222311, "ts": 81995533367.459, "ph": "X", "cat": "fee", "dur": 0.037, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995533367.369, "ph": "X", "cat": "fee", "dur": 0.188, "name": "_int_to_enum (/usr/lib/python3.12/signal.py:24)"}, {"pid": 222311, "tid": 222311, "ts": 81995533362.037, "ph": "X", "cat": "fee", "dur": 5.583, "name": "signal (/usr/lib/python3.12/signal.py:56)"}, {"pid": 222311, "tid": 222311, "ts": 81995533370.441, "ph": "X", "cat": "fee", "dur": 0.048, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995533371.374, "ph": "X", "cat": "fee", "dur": 0.139, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995533371.634, "ph": "X", "cat": "fee", "dur": 0.111, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533371.1, "ph": "X", "cat": "fee", "dur": 0.69, "name": "BaseEventLoop._check_running (/usr/lib/python3.12/asyncio/base_events.py:620)"}, {"pid": 222311, "tid": 222311, "ts": 81995533373.319, "ph": "X", "cat": "fee", "dur": 0.349, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995533372.63, "ph": "X", "cat": "fee", "dur": 1.283, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995533375.841, "ph": "X", "cat": "fee", "dur": 0.066, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995533375.572, "ph": "X", "cat": "fee", "dur": 0.48, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995533377.538, "ph": "X", "cat": "fee", "dur": 0.055, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533376.729, "ph": "X", "cat": "fee", "dur": 0.947, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995533375.35, "ph": "X", "cat": "fee", "dur": 2.461, "name": "ensure_future (/usr/lib/python3.12/asyncio/tasks.py:670)"}, {"pid": 222311, "tid": 222311, "ts": 81995533378.286, "ph": "X", "cat": "fee", "dur": 0.161, "name": "_asyncio.Task.add_done_callback"}, {"pid": 222311, "tid": 222311, "ts": 81995533379.677, "ph": "X", "cat": "fee", "dur": 0.053, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995533379.972, "ph": "X", "cat": "fee", "dur": 0.048, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995533380.201, "ph": "X", "cat": "fee", "dur": 0.058, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533379.826, "ph": "X", "cat": "fee", "dur": 0.471, "name": "BaseEventLoop._check_running (/usr/lib/python3.12/asyncio/base_events.py:620)"}, {"pid": 222311, "tid": 222311, "ts": 81995533381.13, "ph": "X", "cat": "fee", "dur": 0.476, "name": "BaseEventLoop._set_coroutine_origin_tracking (/usr/lib/python3.12/asyncio/base_events.py:1990)"}, {"pid": 222311, "tid": 222311, "ts": 81995533381.89, "ph": "X", "cat": "fee", "dur": 0.569, "name": "sys.get_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995533382.654, "ph": "X", "cat": "fee", "dur": 0.051, "name": "_thread.get_ident"}, {"pid": 222311, "tid": 222311, "ts": 81995533383.25, "ph": "X", "cat": "fee", "dur": 2.204, "name": "sys.set_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995533385.575, "ph": "X", "cat": "fee", "dur": 0.214, "name": "_asyncio._set_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995533388.571, "ph": "X", "cat": "fee", "dur": 0.077, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533390.58, "ph": "X", "cat": "fee", "dur": 0.074, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533390.704, "ph": "X", "cat": "fee", "dur": 0.328, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995533391.364, "ph": "X", "cat": "fee", "dur": 1.288, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995533390.215, "ph": "X", "cat": "fee", "dur": 2.708, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995533393.859, "ph": "X", "cat": "fee", "dur": 0.067, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995533394.919, "ph": "X", "cat": "fee", "dur": 0.247, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995533394.546, "ph": "X", "cat": "fee", "dur": 1.618, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995533396.487, "ph": "X", "cat": "fee", "dur": 0.081, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533397.478, "ph": "X", "cat": "fee", "dur": 0.163, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8357440, "ts": 81995533404.03, "ph": "X", "cat": "fee", "dur": 0.195, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8357440, "ts": 81995533404.721, "ph": "X", "cat": "fee", "dur": 0.08, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533405.573, "ph": "X", "cat": "fee", "dur": 0.034, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533406.114, "ph": "X", "cat": "fee", "dur": 0.039, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533406.924, "ph": "X", "cat": "fee", "dur": 0.032, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533406.729, "ph": "X", "cat": "fee", "dur": 0.347, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533407.584, "ph": "X", "cat": "fee", "dur": 0.071, "name": "collections.deque.append"}, {"pid": 222311, "tid": 8357440, "ts": 81995533406.405, "ph": "X", "cat": "fee", "dur": 1.344, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533405.965, "ph": "X", "cat": "fee", "dur": 1.903, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533408.307, "ph": "X", "cat": "fee", "dur": 0.139, "name": "set.add"}, {"pid": 222311, "tid": 8357440, "ts": 81995533408.066, "ph": "X", "cat": "fee", "dur": 0.425, "name": "WeakSet.add (/usr/lib/python3.12/_weakrefset.py:85)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533404.55, "ph": "X", "cat": "fee", "dur": 4.332, "name": "BaseEventLoop.create_task (/usr/lib/python3.12/asyncio/base_events.py:451)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533409.727, "ph": "X", "cat": "fee", "dur": 0.04, "name": "_set_task_name (/usr/lib/python3.12/asyncio/tasks.py:70)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533403.881, "ph": "X", "cat": "fee", "dur": 6.111, "name": "create_task (/usr/lib/python3.12/asyncio/tasks.py:412)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533410.403, "ph": "X", "cat": "fee", "dur": 0.044, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8357440, "ts": 81995533410.74, "ph": "X", "cat": "fee", "dur": 0.029, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.066, "ph": "X", "cat": "fee", "dur": 0.038, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.365, "ph": "X", "cat": "fee", "dur": 0.02, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.904, "ph": "X", "cat": "fee", "dur": 0.025, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.745, "ph": "X", "cat": "fee", "dur": 0.243, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533412.212, "ph": "X", "cat": "fee", "dur": 0.059, "name": "collections.deque.append"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.557, "ph": "X", "cat": "fee", "dur": 0.753, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533411.297, "ph": "X", "cat": "fee", "dur": 1.11, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533412.657, "ph": "X", "cat": "fee", "dur": 0.103, "name": "set.add"}, {"pid": 222311, "tid": 8357440, "ts": 81995533412.507, "ph": "X", "cat": "fee", "dur": 0.297, "name": "WeakSet.add (/usr/lib/python3.12/_weakrefset.py:85)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533410.659, "ph": "X", "cat": "fee", "dur": 2.338, "name": "BaseEventLoop.create_task (/usr/lib/python3.12/asyncio/base_events.py:451)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533413.172, "ph": "X", "cat": "fee", "dur": 0.036, "name": "_set_task_name (/usr/lib/python3.12/asyncio/tasks.py:70)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533410.317, "ph": "X", "cat": "fee", "dur": 2.968, "name": "create_task (/usr/lib/python3.12/asyncio/tasks.py:412)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533413.546, "ph": "X", "cat": "fee", "dur": 0.023, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8357440, "ts": 81995533413.751, "ph": "X", "cat": "fee", "dur": 0.024, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.132, "ph": "X", "cat": "fee", "dur": 0.036, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.395, "ph": "X", "cat": "fee", "dur": 0.023, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.74, "ph": "X", "cat": "fee", "dur": 0.023, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.66, "ph": "X", "cat": "fee", "dur": 0.236, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533416.018, "ph": "X", "cat": "fee", "dur": 0.046, "name": "collections.deque.append"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.549, "ph": "X", "cat": "fee", "dur": 0.564, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533415.345, "ph": "X", "cat": "fee", "dur": 0.844, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533416.462, "ph": "X", "cat": "fee", "dur": 0.051, "name": "set.add"}, {"pid": 222311, "tid": 8357440, "ts": 81995533416.288, "ph": "X", "cat": "fee", "dur": 0.261, "name": "WeakSet.add (/usr/lib/python3.12/_weakrefset.py:85)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533413.695, "ph": "X", "cat": "fee", "dur": 2.978, "name": "BaseEventLoop.create_task (/usr/lib/python3.12/asyncio/base_events.py:451)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533416.821, "ph": "X", "cat": "fee", "dur": 0.018, "name": "_set_task_name (/usr/lib/python3.12/asyncio/tasks.py:70)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533413.483, "ph": "X", "cat": "fee", "dur": 3.418, "name": "create_task (/usr/lib/python3.12/asyncio/tasks.py:412)"}, {"pid": 222311, "tid": 8357440, "ts": 81995533402.34, "ph": "X", "cat": "fee", "dur": 14.984, "name": "main (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:8)"}, {"pid": 222311, "tid": 222311, "ts": 81995533400.275, "ph": "X", "cat": "fee", "dur": 17.516, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995533398.875, "ph": "X", "cat": "fee", "dur": 20.003, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995533388.303, "ph": "X", "cat": "fee", "dur": 31.119, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995533420.004, "ph": "X", "cat": "fee", "dur": 0.086, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533420.88, "ph": "X", "cat": "fee", "dur": 0.048, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533420.966, "ph": "X", "cat": "fee", "dur": 0.188, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995533421.41, "ph": "X", "cat": "fee", "dur": 0.338, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995533420.649, "ph": "X", "cat": "fee", "dur": 1.262, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995533422.191, "ph": "X", "cat": "fee", "dur": 0.091, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995533422.658, "ph": "X", "cat": "fee", "dur": 0.091, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995533422.51, "ph": "X", "cat": "fee", "dur": 0.275, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995533423.087, "ph": "X", "cat": "fee", "dur": 0.089, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533423.488, "ph": "X", "cat": "fee", "dur": 0.11, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8358400, "ts": 81995533426.673, "ph": "X", "cat": "fee", "dur": 0.063, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8358400, "ts": 81995533428.089, "ph": "X", "cat": "fee", "dur": 0.046, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533427.301, "ph": "X", "cat": "fee", "dur": 1.078, "name": "BaseEventLoop.create_future (/usr/lib/python3.12/asyncio/base_events.py:447)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533429.809, "ph": "X", "cat": "fee", "dur": 0.069, "name": "time.monotonic"}, {"pid": 222311, "tid": 8358400, "ts": 81995533429.756, "ph": "X", "cat": "fee", "dur": 0.169, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533431.4, "ph": "X", "cat": "fee", "dur": 0.037, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533433.365, "ph": "X", "cat": "fee", "dur": 0.086, "name": "_contextvars.copy_context"}, {"pid": 222311, "tid": 8358400, "ts": 81995533434.179, "ph": "X", "cat": "fee", "dur": 0.035, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533433.227, "ph": "X", "cat": "fee", "dur": 1.192, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533432.794, "ph": "X", "cat": "fee", "dur": 2.163, "name": "TimerHandle.__init__ (/usr/lib/python3.12/asyncio/events.py:111)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533435.846, "ph": "X", "cat": "fee", "dur": 0.543, "name": "_heapq.heappush"}, {"pid": 222311, "tid": 8358400, "ts": 81995533431.14, "ph": "X", "cat": "fee", "dur": 5.464, "name": "BaseEventLoop.call_at (/usr/lib/python3.12/asyncio/base_events.py:767)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533429.366, "ph": "X", "cat": "fee", "dur": 7.62, "name": "BaseEventLoop.call_later (/usr/lib/python3.12/asyncio/base_events.py:743)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533426.281, "ph": "X", "cat": "fee", "dur": 11.087, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8358400, "ts": 81995533424.879, "ph": "X", "cat": "fee", "dur": 12.566, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995533424.228, "ph": "X", "cat": "fee", "dur": 13.422, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995533423.871, "ph": "X", "cat": "fee", "dur": 13.872, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995533437.944, "ph": "X", "cat": "fee", "dur": 0.092, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8358976, "ts": 81995533439.309, "ph": "X", "cat": "fee", "dur": 0.076, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8358976, "ts": 81995533439.924, "ph": "X", "cat": "fee", "dur": 0.042, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533439.568, "ph": "X", "cat": "fee", "dur": 0.522, "name": "BaseEventLoop.create_future (/usr/lib/python3.12/asyncio/base_events.py:447)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533440.712, "ph": "X", "cat": "fee", "dur": 0.064, "name": "time.monotonic"}, {"pid": 222311, "tid": 8358976, "ts": 81995533440.666, "ph": "X", "cat": "fee", "dur": 0.133, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533441.361, "ph": "X", "cat": "fee", "dur": 0.043, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533442.213, "ph": "X", "cat": "fee", "dur": 0.064, "name": "_contextvars.copy_context"}, {"pid": 222311, "tid": 8358976, "ts": 81995533442.619, "ph": "X", "cat": "fee", "dur": 0.033, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533442.136, "ph": "X", "cat": "fee", "dur": 0.625, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533441.839, "ph": "X", "cat": "fee", "dur": 1.206, "name": "TimerHandle.__init__ (/usr/lib/python3.12/asyncio/events.py:111)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533444.137, "ph": "X", "cat": "fee", "dur": 0.07, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 8358976, "ts": 81995533443.988, "ph": "X", "cat": "fee", "dur": 0.424, "name": "TimerHandle.__lt__ (/usr/lib/python3.12/asyncio/events.py:127)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533443.354, "ph": "X", "cat": "fee", "dur": 1.216, "name": "_heapq.heappush"}, {"pid": 222311, "tid": 8358976, "ts": 81995533441.246, "ph": "X", "cat": "fee", "dur": 3.423, "name": "BaseEventLoop.call_at (/usr/lib/python3.12/asyncio/base_events.py:767)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533440.451, "ph": "X", "cat": "fee", "dur": 4.43, "name": "BaseEventLoop.call_later (/usr/lib/python3.12/asyncio/base_events.py:743)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533439.174, "ph": "X", "cat": "fee", "dur": 5.907, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8358976, "ts": 81995533438.837, "ph": "X", "cat": "fee", "dur": 7.3, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995533438.627, "ph": "X", "cat": "fee", "dur": 7.618, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995533438.413, "ph": "X", "cat": "fee", "dur": 7.891, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995533446.396, "ph": "X", "cat": "fee", "dur": 0.072, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8359936, "ts": 81995533447.292, "ph": "X", "cat": "fee", "dur": 0.052, "name": "_asyncio.get_running_loop"}, {"pid": 222311, "tid": 8359936, "ts": 81995533447.618, "ph": "X", "cat": "fee", "dur": 0.024, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533447.44, "ph": "X", "cat": "fee", "dur": 0.359, "name": "BaseEventLoop.create_future (/usr/lib/python3.12/asyncio/base_events.py:447)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533448.216, "ph": "X", "cat": "fee", "dur": 0.081, "name": "time.monotonic"}, {"pid": 222311, "tid": 8359936, "ts": 81995533448.163, "ph": "X", "cat": "fee", "dur": 0.174, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533448.741, "ph": "X", "cat": "fee", "dur": 0.054, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533449.368, "ph": "X", "cat": "fee", "dur": 0.047, "name": "_contextvars.copy_context"}, {"pid": 222311, "tid": 8359936, "ts": 81995533449.649, "ph": "X", "cat": "fee", "dur": 0.037, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533449.325, "ph": "X", "cat": "fee", "dur": 0.472, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533449.088, "ph": "X", "cat": "fee", "dur": 1.788, "name": "TimerHandle.__init__ (/usr/lib/python3.12/asyncio/events.py:111)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533451.397, "ph": "X", "cat": "fee", "dur": 0.052, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 8359936, "ts": 81995533451.28, "ph": "X", "cat": "fee", "dur": 0.36, "name": "TimerHandle.__lt__ (/usr/lib/python3.12/asyncio/events.py:127)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533451.109, "ph": "X", "cat": "fee", "dur": 0.634, "name": "_heapq.heappush"}, {"pid": 222311, "tid": 8359936, "ts": 81995533448.661, "ph": "X", "cat": "fee", "dur": 3.148, "name": "BaseEventLoop.call_at (/usr/lib/python3.12/asyncio/base_events.py:767)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533448.016, "ph": "X", "cat": "fee", "dur": 3.974, "name": "BaseEventLoop.call_later (/usr/lib/python3.12/asyncio/base_events.py:743)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533447.158, "ph": "X", "cat": "fee", "dur": 4.993, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8359936, "ts": 81995533446.913, "ph": "X", "cat": "fee", "dur": 5.284, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995533446.797, "ph": "X", "cat": "fee", "dur": 5.513, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995533446.664, "ph": "X", "cat": "fee", "dur": 5.691, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995533419.835, "ph": "X", "cat": "fee", "dur": 32.674, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995533452.898, "ph": "X", "cat": "fee", "dur": 0.067, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533453.825, "ph": "X", "cat": "fee", "dur": 0.086, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995533453.777, "ph": "X", "cat": "fee", "dur": 0.188, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995533454.147, "ph": "X", "cat": "fee", "dur": 0.285, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995533454.607, "ph": "X", "cat": "fee", "dur": 0.261, "name": "builtins.min"}, {"pid": 222311, "tid": 222311, "ts": 81995533455.739, "ph": "X", "cat": "fee", "dur": 2.021, "name": "math.ceil"}, {"pid": 222311, "tid": 222311, "ts": 81995533458.071, "ph": "X", "cat": "fee", "dur": 0.069, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995533458.18, "ph": "X", "cat": "fee", "dur": 0.143, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995533458.473, "ph": "X", "cat": "fee", "dur": 10256.366, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995533455.064, "ph": "X", "cat": "fee", "dur": 10266.535, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995543731.551, "ph": "X", "cat": "fee", "dur": 0.909, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995543737.811, "ph": "X", "cat": "fee", "dur": 4.045, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995543735.107, "ph": "X", "cat": "fee", "dur": 7.52, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995543762.971, "ph": "X", "cat": "fee", "dur": 1.19, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995543761.621, "ph": "X", "cat": "fee", "dur": 4.02, "name": "TimerHandle.__lt__ (/usr/lib/python3.12/asyncio/events.py:127)"}, {"pid": 222311, "tid": 222311, "ts": 81995543755.422, "ph": "X", "cat": "fee", "dur": 11.497, "name": "_heapq.heappop"}, {"pid": 222311, "tid": 222311, "ts": 81995543771.798, "ph": "X", "cat": "fee", "dur": 1.555, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543778.774, "ph": "X", "cat": "fee", "dur": 0.87, "name": "_heapq.heappop"}, {"pid": 222311, "tid": 222311, "ts": 81995543781.26, "ph": "X", "cat": "fee", "dur": 0.423, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543783.142, "ph": "X", "cat": "fee", "dur": 0.776, "name": "_heapq.heappop"}, {"pid": 222311, "tid": 222311, "ts": 81995543784.517, "ph": "X", "cat": "fee", "dur": 0.483, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543786.125, "ph": "X", "cat": "fee", "dur": 1.167, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995543791.944, "ph": "X", "cat": "fee", "dur": 0.637, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 222311, "ts": 81995543855.655, "ph": "X", "cat": "fee", "dur": 1.388, "name": "_asyncio.Future.cancelled"}, {"pid": 222311, "tid": 222311, "ts": 81995543867.766, "ph": "X", "cat": "fee", "dur": 0.536, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995543877.834, "ph": "X", "cat": "fee", "dur": 0.535, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995543875.5, "ph": "X", "cat": "fee", "dur": 3.631, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995543883.692, "ph": "X", "cat": "fee", "dur": 1.23, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543871.111, "ph": "X", "cat": "fee", "dur": 14.648, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995543866.046, "ph": "X", "cat": "fee", "dur": 20.578, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995543859.629, "ph": "X", "cat": "fee", "dur": 28.424, "name": "_asyncio.Future.set_result"}, {"pid": 222311, "tid": 222311, "ts": 81995543853.372, "ph": "X", "cat": "fee", "dur": 35.936, "name": "_set_result_unless_cancelled (/usr/lib/python3.12/asyncio/futures.py:311)"}, {"pid": 222311, "tid": 222311, "ts": 81995543845.782, "ph": "X", "cat": "fee", "dur": 44.595, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995543835.954, "ph": "X", "cat": "fee", "dur": 55.889, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995543893.624, "ph": "X", "cat": "fee", "dur": 0.666, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 222311, "ts": 81995543901.066, "ph": "X", "cat": "fee", "dur": 0.57, "name": "_asyncio.Future.cancelled"}, {"pid": 222311, "tid": 222311, "ts": 81995543904.702, "ph": "X", "cat": "fee", "dur": 0.395, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995543908.586, "ph": "X", "cat": "fee", "dur": 0.388, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995543907.343, "ph": "X", "cat": "fee", "dur": 1.996, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995543910.78, "ph": "X", "cat": "fee", "dur": 0.478, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543906.189, "ph": "X", "cat": "fee", "dur": 5.655, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995543904.014, "ph": "X", "cat": "fee", "dur": 8.296, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995543902.759, "ph": "X", "cat": "fee", "dur": 9.924, "name": "_asyncio.Future.set_result"}, {"pid": 222311, "tid": 222311, "ts": 81995543899.837, "ph": "X", "cat": "fee", "dur": 13.53, "name": "_set_result_unless_cancelled (/usr/lib/python3.12/asyncio/futures.py:311)"}, {"pid": 222311, "tid": 222311, "ts": 81995543899.178, "ph": "X", "cat": "fee", "dur": 14.496, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995543896.599, "ph": "X", "cat": "fee", "dur": 17.447, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995543914.805, "ph": "X", "cat": "fee", "dur": 0.427, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 222311, "ts": 81995543919.113, "ph": "X", "cat": "fee", "dur": 0.433, "name": "_asyncio.Future.cancelled"}, {"pid": 222311, "tid": 222311, "ts": 81995543922.231, "ph": "X", "cat": "fee", "dur": 0.376, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995543925.638, "ph": "X", "cat": "fee", "dur": 0.19, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995543924.774, "ph": "X", "cat": "fee", "dur": 1.531, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995543927.353, "ph": "X", "cat": "fee", "dur": 0.33, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995543923.411, "ph": "X", "cat": "fee", "dur": 4.975, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995543921.656, "ph": "X", "cat": "fee", "dur": 7.069, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995543920.398, "ph": "X", "cat": "fee", "dur": 8.766, "name": "_asyncio.Future.set_result"}, {"pid": 222311, "tid": 222311, "ts": 81995543918.41, "ph": "X", "cat": "fee", "dur": 11.231, "name": "_set_result_unless_cancelled (/usr/lib/python3.12/asyncio/futures.py:311)"}, {"pid": 222311, "tid": 222311, "ts": 81995543917.803, "ph": "X", "cat": "fee", "dur": 12.159, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995543916.226, "ph": "X", "cat": "fee", "dur": 14.144, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995533452.825, "ph": "X", "cat": "fee", "dur": 10478.542, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995543936.013, "ph": "X", "cat": "fee", "dur": 0.788, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995543943.78, "ph": "X", "cat": "fee", "dur": 1.301, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995543945.56, "ph": "X", "cat": "fee", "dur": 5.954, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995543953.698, "ph": "X", "cat": "fee", "dur": 10.31, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995543940.907, "ph": "X", "cat": "fee", "dur": 24.987, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995543968.532, "ph": "X", "cat": "fee", "dur": 0.86, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995543972.139, "ph": "X", "cat": "fee", "dur": 1.137, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995543971.319, "ph": "X", "cat": "fee", "dur": 2.297, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995543975.003, "ph": "X", "cat": "fee", "dur": 0.802, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995543978.728, "ph": "X", "cat": "fee", "dur": 0.503, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8358400, "ts": 81995544149.956, "ph": "X", "cat": "fee", "dur": 0.937, "name": "BaseEventLoop._timer_handle_cancelled (/usr/lib/python3.12/asyncio/base_events.py:1905)"}, {"pid": 222311, "tid": 8358400, "ts": 81995544169.2, "ph": "X", "cat": "fee", "dur": 0.617, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358400, "ts": 81995544165.373, "ph": "X", "cat": "fee", "dur": 7.28, "name": "Handle.cancel (/usr/lib/python3.12/asyncio/events.py:72)"}, {"pid": 222311, "tid": 8358400, "ts": 81995544141.16, "ph": "X", "cat": "fee", "dur": 32.401, "name": "TimerHandle.cancel (/usr/lib/python3.12/asyncio/events.py:155)"}, {"pid": 222311, "tid": 8358400, "ts": 81995544007.105, "ph": "X", "cat": "fee", "dur": 167.013, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8358400, "ts": 81995544005.683, "ph": "X", "cat": "fee", "dur": 173.389, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995544183.926, "ph": "X", "cat": "fee", "dur": 0.411, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544190.642, "ph": "X", "cat": "fee", "dur": 0.469, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995544188.641, "ph": "X", "cat": "fee", "dur": 3.262, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544194.827, "ph": "X", "cat": "fee", "dur": 1.188, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995544186.14, "ph": "X", "cat": "fee", "dur": 10.759, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995544182.982, "ph": "X", "cat": "fee", "dur": 14.523, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995543995.984, "ph": "X", "cat": "fee", "dur": 204.177, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995543992.132, "ph": "X", "cat": "fee", "dur": 209.109, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544202.943, "ph": "X", "cat": "fee", "dur": 0.876, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8358976, "ts": 81995544223.083, "ph": "X", "cat": "fee", "dur": 0.846, "name": "BaseEventLoop._timer_handle_cancelled (/usr/lib/python3.12/asyncio/base_events.py:1905)"}, {"pid": 222311, "tid": 8358976, "ts": 81995544230.092, "ph": "X", "cat": "fee", "dur": 0.141, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8358976, "ts": 81995544227.663, "ph": "X", "cat": "fee", "dur": 4.94, "name": "Handle.cancel (/usr/lib/python3.12/asyncio/events.py:72)"}, {"pid": 222311, "tid": 8358976, "ts": 81995544220.364, "ph": "X", "cat": "fee", "dur": 12.977, "name": "TimerHandle.cancel (/usr/lib/python3.12/asyncio/events.py:155)"}, {"pid": 222311, "tid": 8358976, "ts": 81995544216.231, "ph": "X", "cat": "fee", "dur": 17.66, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8358976, "ts": 81995544215.509, "ph": "X", "cat": "fee", "dur": 20.108, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995544210.902, "ph": "X", "cat": "fee", "dur": 25.939, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544207.72, "ph": "X", "cat": "fee", "dur": 29.8, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544238.047, "ph": "X", "cat": "fee", "dur": 0.489, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8359936, "ts": 81995544246.194, "ph": "X", "cat": "fee", "dur": 0.407, "name": "BaseEventLoop._timer_handle_cancelled (/usr/lib/python3.12/asyncio/base_events.py:1905)"}, {"pid": 222311, "tid": 8359936, "ts": 81995544249.29, "ph": "X", "cat": "fee", "dur": 0.283, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 8359936, "ts": 81995544248.21, "ph": "X", "cat": "fee", "dur": 2.153, "name": "Handle.cancel (/usr/lib/python3.12/asyncio/events.py:72)"}, {"pid": 222311, "tid": 8359936, "ts": 81995544245.215, "ph": "X", "cat": "fee", "dur": 5.546, "name": "TimerHandle.cancel (/usr/lib/python3.12/asyncio/events.py:155)"}, {"pid": 222311, "tid": 8359936, "ts": 81995544243.485, "ph": "X", "cat": "fee", "dur": 7.721, "name": "sleep (/usr/lib/python3.12/asyncio/tasks.py:653)"}, {"pid": 222311, "tid": 8359936, "ts": 81995544243.027, "ph": "X", "cat": "fee", "dur": 9.148, "name": "io_task (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:4)"}, {"pid": 222311, "tid": 222311, "ts": 81995544241.182, "ph": "X", "cat": "fee", "dur": 11.586, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544239.968, "ph": "X", "cat": "fee", "dur": 13.113, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995543934.966, "ph": "X", "cat": "fee", "dur": 319.719, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995544258.076, "ph": "X", "cat": "fee", "dur": 0.806, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544262.747, "ph": "X", "cat": "fee", "dur": 0.427, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544263.522, "ph": "X", "cat": "fee", "dur": 2.449, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995544267.063, "ph": "X", "cat": "fee", "dur": 4.731, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995544261.448, "ph": "X", "cat": "fee", "dur": 12.109, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995544275.907, "ph": "X", "cat": "fee", "dur": 0.753, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995544278.767, "ph": "X", "cat": "fee", "dur": 0.998, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995544278.123, "ph": "X", "cat": "fee", "dur": 1.936, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995544281.576, "ph": "X", "cat": "fee", "dur": 0.802, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544284.944, "ph": "X", "cat": "fee", "dur": 0.586, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8357440, "ts": 81995544290.442, "ph": "X", "cat": "fee", "dur": 3.936, "name": "main (/home/gaogaotiantian/programs/viztracer/example/src/async_simple.py:8)"}, {"pid": 222311, "tid": 222311, "ts": 81995544297.251, "ph": "X", "cat": "fee", "dur": 0.253, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544301.226, "ph": "X", "cat": "fee", "dur": 0.231, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995544299.844, "ph": "X", "cat": "fee", "dur": 2.039, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544312.6, "ph": "X", "cat": "fee", "dur": 0.594, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995544298.566, "ph": "X", "cat": "fee", "dur": 15.358, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995544296.503, "ph": "X", "cat": "fee", "dur": 18.182, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995544288.327, "ph": "X", "cat": "fee", "dur": 27.508, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544286.928, "ph": "X", "cat": "fee", "dur": 29.415, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544257.418, "ph": "X", "cat": "fee", "dur": 60.312, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995544319.131, "ph": "X", "cat": "fee", "dur": 0.452, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544321.129, "ph": "X", "cat": "fee", "dur": 0.212, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544321.668, "ph": "X", "cat": "fee", "dur": 1.267, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995544323.427, "ph": "X", "cat": "fee", "dur": 1.698, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995544320.65, "ph": "X", "cat": "fee", "dur": 5.132, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995544326.897, "ph": "X", "cat": "fee", "dur": 0.458, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995544328.453, "ph": "X", "cat": "fee", "dur": 0.51, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995544328.09, "ph": "X", "cat": "fee", "dur": 1.06, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995544329.798, "ph": "X", "cat": "fee", "dur": 0.576, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544331.755, "ph": "X", "cat": "fee", "dur": 0.475, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 222311, "ts": 81995544340.918, "ph": "X", "cat": "fee", "dur": 0.607, "name": "_asyncio.Task.cancelled"}, {"pid": 222311, "tid": 222311, "ts": 81995544343.099, "ph": "X", "cat": "fee", "dur": 0.87, "name": "_asyncio.Task.exception"}, {"pid": 222311, "tid": 222311, "ts": 81995544347.459, "ph": "X", "cat": "fee", "dur": 4.744, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995544357.917, "ph": "X", "cat": "fee", "dur": 0.761, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544356.317, "ph": "X", "cat": "fee", "dur": 2.864, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544362.992, "ph": "X", "cat": "fee", "dur": 1.794, "name": "BaseEventLoop.stop (/usr/lib/python3.12/asyncio/base_events.py:689)"}, {"pid": 222311, "tid": 222311, "ts": 81995544339.137, "ph": "X", "cat": "fee", "dur": 26.189, "name": "_run_until_complete_cb (/usr/lib/python3.12/asyncio/base_events.py:182)"}, {"pid": 222311, "tid": 222311, "ts": 81995544334.985, "ph": "X", "cat": "fee", "dur": 30.808, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544333.015, "ph": "X", "cat": "fee", "dur": 33.317, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544318.927, "ph": "X", "cat": "fee", "dur": 48.714, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995544370.914, "ph": "X", "cat": "fee", "dur": 2.433, "name": "_asyncio._set_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544376.094, "ph": "X", "cat": "fee", "dur": 5.057, "name": "BaseEventLoop._set_coroutine_origin_tracking (/usr/lib/python3.12/asyncio/base_events.py:1990)"}, {"pid": 222311, "tid": 222311, "ts": 81995544385.769, "ph": "X", "cat": "fee", "dur": 33.156, "name": "sys.set_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995533379.521, "ph": "X", "cat": "fee", "dur": 11040.279, "name": "BaseEventLoop.run_forever (/usr/lib/python3.12/asyncio/base_events.py:627)"}, {"pid": 222311, "tid": 222311, "ts": 81995544424.466, "ph": "X", "cat": "fee", "dur": 1.708, "name": "_asyncio.Task.remove_done_callback"}, {"pid": 222311, "tid": 222311, "ts": 81995544427.999, "ph": "X", "cat": "fee", "dur": 0.856, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544430.219, "ph": "X", "cat": "fee", "dur": 0.635, "name": "_asyncio.Task.result"}, {"pid": 222311, "tid": 222311, "ts": 81995533370.222, "ph": "X", "cat": "fee", "dur": 11061.203, "name": "BaseEventLoop.run_until_complete (/usr/lib/python3.12/asyncio/base_events.py:651)"}, {"pid": 222311, "tid": 222311, "ts": 81995544438.407, "ph": "X", "cat": "fee", "dur": 0.911, "name": "_signal.getsignal"}, {"pid": 222311, "tid": 222311, "ts": 81995544442.046, "ph": "X", "cat": "fee", "dur": 3.377, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995544441.264, "ph": "X", "cat": "fee", "dur": 4.674, "name": "_int_to_enum (/usr/lib/python3.12/signal.py:24)"}, {"pid": 222311, "tid": 222311, "ts": 81995544435.999, "ph": "X", "cat": "fee", "dur": 10.302, "name": "getsignal (/usr/lib/python3.12/signal.py:62)"}, {"pid": 222311, "tid": 222311, "ts": 81995544449.659, "ph": "X", "cat": "fee", "dur": 2.415, "name": "_enum_to_int (/usr/lib/python3.12/signal.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544452.829, "ph": "X", "cat": "fee", "dur": 15.596, "name": "_enum_to_int (/usr/lib/python3.12/signal.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544469.24, "ph": "X", "cat": "fee", "dur": 5.593, "name": "_signal.signal"}, {"pid": 222311, "tid": 222311, "ts": 81995544476.719, "ph": "X", "cat": "fee", "dur": 0.815, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995544476.17, "ph": "X", "cat": "fee", "dur": 1.716, "name": "_int_to_enum (/usr/lib/python3.12/signal.py:24)"}, {"pid": 222311, "tid": 222311, "ts": 81995544448.36, "ph": "X", "cat": "fee", "dur": 30.029, "name": "signal (/usr/lib/python3.12/signal.py:56)"}, {"pid": 222311, "tid": 222311, "ts": 81995533339.042, "ph": "X", "cat": "fee", "dur": 11140.032, "name": "Runner.run (/usr/lib/python3.12/asyncio/runners.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544523.856, "ph": "X", "cat": "fee", "dur": 0.629, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544532.534, "ph": "X", "cat": "fee", "dur": 1.056, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544521.54, "ph": "X", "cat": "fee", "dur": 13.386, "name": "WeakSet.__len__ (/usr/lib/python3.12/_weakrefset.py:72)"}, {"pid": 222311, "tid": 222311, "ts": 81995544545.799, "ph": "X", "cat": "fee", "dur": 3.688, "name": "_IterationGuard.__init__ (/usr/lib/python3.12/_weakrefset.py:17)"}, {"pid": 222311, "tid": 222311, "ts": 81995544556.675, "ph": "X", "cat": "fee", "dur": 1.196, "name": "set.add"}, {"pid": 222311, "tid": 222311, "ts": 81995544553.062, "ph": "X", "cat": "fee", "dur": 5.391, "name": "_IterationGuard.__enter__ (/usr/lib/python3.12/_weakrefset.py:21)"}, {"pid": 222311, "tid": 222311, "ts": 81995544539.953, "ph": "X", "cat": "fee", "dur": 21.289, "name": "WeakSet.__iter__ (/usr/lib/python3.12/_weakrefset.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995544561.775, "ph": "X", "cat": "fee", "dur": 1.673, "name": "WeakSet.__iter__ (/usr/lib/python3.12/_weakrefset.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995544563.725, "ph": "X", "cat": "fee", "dur": 0.844, "name": "WeakSet.__iter__ (/usr/lib/python3.12/_weakrefset.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995544564.859, "ph": "X", "cat": "fee", "dur": 0.516, "name": "WeakSet.__iter__ (/usr/lib/python3.12/_weakrefset.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995544572.816, "ph": "X", "cat": "fee", "dur": 1.559, "name": "set.remove"}, {"pid": 222311, "tid": 222311, "ts": 81995544582.437, "ph": "X", "cat": "fee", "dur": 2.487, "name": "list.pop"}, {"pid": 222311, "tid": 222311, "ts": 81995544579.359, "ph": "X", "cat": "fee", "dur": 9.304, "name": "WeakSet._commit_removals (/usr/lib/python3.12/_weakrefset.py:53)"}, {"pid": 222311, "tid": 222311, "ts": 81995544569.916, "ph": "X", "cat": "fee", "dur": 20.12, "name": "_IterationGuard.__exit__ (/usr/lib/python3.12/_weakrefset.py:27)"}, {"pid": 222311, "tid": 222311, "ts": 81995544565.647, "ph": "X", "cat": "fee", "dur": 27.075, "name": "WeakSet.__iter__ (/usr/lib/python3.12/_weakrefset.py:63)"}, {"pid": 222311, "tid": 222311, "ts": 81995544604.07, "ph": "X", "cat": "fee", "dur": 0.499, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544602.775, "ph": "X", "cat": "fee", "dur": 2.185, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544606.714, "ph": "X", "cat": "fee", "dur": 0.712, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544610.029, "ph": "X", "cat": "fee", "dur": 0.345, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544609.726, "ph": "X", "cat": "fee", "dur": 0.838, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544611.639, "ph": "X", "cat": "fee", "dur": 0.393, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544613.659, "ph": "X", "cat": "fee", "dur": 0.209, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544612.876, "ph": "X", "cat": "fee", "dur": 1.2, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544614.756, "ph": "X", "cat": "fee", "dur": 0.342, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544616.176, "ph": "X", "cat": "fee", "dur": 0.194, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544615.772, "ph": "X", "cat": "fee", "dur": 0.788, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544617.163, "ph": "X", "cat": "fee", "dur": 0.236, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544509.531, "ph": "X", "cat": "fee", "dur": 110.25, "name": "all_tasks (/usr/lib/python3.12/asyncio/tasks.py:43)"}, {"pid": 222311, "tid": 222311, "ts": 81995544501.738, "ph": "X", "cat": "fee", "dur": 119.8, "name": "_cancel_all_tasks (/usr/lib/python3.12/asyncio/runners.py:197)"}, {"pid": 222311, "tid": 222311, "ts": 81995544627.807, "ph": "X", "cat": "fee", "dur": 0.497, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544629.978, "ph": "X", "cat": "fee", "dur": 0.901, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995544631.668, "ph": "X", "cat": "fee", "dur": 1.023, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544629.507, "ph": "X", "cat": "fee", "dur": 3.66, "name": "BaseEventLoop._check_running (/usr/lib/python3.12/asyncio/base_events.py:620)"}, {"pid": 222311, "tid": 222311, "ts": 81995544636.889, "ph": "X", "cat": "fee", "dur": 1.921, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995544634.83, "ph": "X", "cat": "fee", "dur": 4.546, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995544644.298, "ph": "X", "cat": "fee", "dur": 0.444, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995544643.535, "ph": "X", "cat": "fee", "dur": 1.516, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995544646.89, "ph": "X", "cat": "fee", "dur": 3.49, "name": "iscoroutine (/usr/lib/python3.12/asyncio/coroutines.py:32)"}, {"pid": 222311, "tid": 222311, "ts": 81995544653.484, "ph": "X", "cat": "fee", "dur": 0.393, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544658.876, "ph": "X", "cat": "fee", "dur": 0.331, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995544663.407, "ph": "X", "cat": "fee", "dur": 0.169, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544668.782, "ph": "X", "cat": "fee", "dur": 0.254, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995544667.283, "ph": "X", "cat": "fee", "dur": 2.264, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544671.688, "ph": "X", "cat": "fee", "dur": 0.476, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995544664.944, "ph": "X", "cat": "fee", "dur": 7.794, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995544662.824, "ph": "X", "cat": "fee", "dur": 10.631, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995544677.664, "ph": "X", "cat": "fee", "dur": 2.646, "name": "set.add"}, {"pid": 222311, "tid": 222311, "ts": 81995544674.822, "ph": "X", "cat": "fee", "dur": 5.929, "name": "WeakSet.add (/usr/lib/python3.12/_weakrefset.py:85)"}, {"pid": 222311, "tid": 222311, "ts": 81995544652.822, "ph": "X", "cat": "fee", "dur": 40.163, "name": "BaseEventLoop.create_task (/usr/lib/python3.12/asyncio/base_events.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995544642.323, "ph": "X", "cat": "fee", "dur": 51.195, "name": "ensure_future (/usr/lib/python3.12/asyncio/tasks.py:670)"}, {"pid": 222311, "tid": 222311, "ts": 81995544697.522, "ph": "X", "cat": "fee", "dur": 1.328, "name": "_asyncio.Task.add_done_callback"}, {"pid": 222311, "tid": 222311, "ts": 81995544701.492, "ph": "X", "cat": "fee", "dur": 0.359, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544702.995, "ph": "X", "cat": "fee", "dur": 0.427, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995544703.907, "ph": "X", "cat": "fee", "dur": 0.217, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544702.502, "ph": "X", "cat": "fee", "dur": 1.86, "name": "BaseEventLoop._check_running (/usr/lib/python3.12/asyncio/base_events.py:620)"}, {"pid": 222311, "tid": 222311, "ts": 81995544705.961, "ph": "X", "cat": "fee", "dur": 2.359, "name": "BaseEventLoop._set_coroutine_origin_tracking (/usr/lib/python3.12/asyncio/base_events.py:1990)"}, {"pid": 222311, "tid": 222311, "ts": 81995544710.152, "ph": "X", "cat": "fee", "dur": 1.604, "name": "sys.get_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995544773.64, "ph": "X", "cat": "fee", "dur": 2.167, "name": "_thread.get_ident"}, {"pid": 222311, "tid": 222311, "ts": 81995544780.078, "ph": "X", "cat": "fee", "dur": 26.855, "name": "sys.set_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995544808.816, "ph": "X", "cat": "fee", "dur": 1.852, "name": "_asyncio._set_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544813.9, "ph": "X", "cat": "fee", "dur": 0.738, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544819.138, "ph": "X", "cat": "fee", "dur": 0.693, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544820.365, "ph": "X", "cat": "fee", "dur": 2.13, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995544824.0, "ph": "X", "cat": "fee", "dur": 4.758, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995544817.728, "ph": "X", "cat": "fee", "dur": 12.96, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995544833.015, "ph": "X", "cat": "fee", "dur": 0.673, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995544836.289, "ph": "X", "cat": "fee", "dur": 0.988, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995544835.827, "ph": "X", "cat": "fee", "dur": 1.885, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995544838.925, "ph": "X", "cat": "fee", "dur": 0.745, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544842.725, "ph": "X", "cat": "fee", "dur": 0.887, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 8356864, "ts": 81995544866.751, "ph": "X", "cat": "fee", "dur": 0.543, "name": "builtins.len"}, {"pid": 222311, "tid": 8356864, "ts": 81995544868.117, "ph": "X", "cat": "fee", "dur": 0.516, "name": "builtins.len"}, {"pid": 222311, "tid": 8356864, "ts": 81995544865.252, "ph": "X", "cat": "fee", "dur": 4.599, "name": "WeakSet.__len__ (/usr/lib/python3.12/_weakrefset.py:72)"}, {"pid": 222311, "tid": 8356864, "ts": 81995544863.712, "ph": "X", "cat": "fee", "dur": 7.454, "name": "builtins.len"}, {"pid": 222311, "tid": 8356864, "ts": 81995544861.173, "ph": "X", "cat": "fee", "dur": 11.002, "name": "BaseEventLoop.shutdown_asyncgens (/usr/lib/python3.12/asyncio/base_events.py:561)"}, {"pid": 222311, "tid": 222311, "ts": 81995544875.856, "ph": "X", "cat": "fee", "dur": 0.639, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544881.737, "ph": "X", "cat": "fee", "dur": 0.485, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995544879.888, "ph": "X", "cat": "fee", "dur": 3.01, "name": "Handle.__init__ (/usr/lib/python3.12/asyncio/events.py:36)"}, {"pid": 222311, "tid": 222311, "ts": 81995544885.305, "ph": "X", "cat": "fee", "dur": 0.716, "name": "collections.deque.append"}, {"pid": 222311, "tid": 222311, "ts": 81995544877.94, "ph": "X", "cat": "fee", "dur": 8.927, "name": "BaseEventLoop._call_soon (/usr/lib/python3.12/asyncio/base_events.py:814)"}, {"pid": 222311, "tid": 222311, "ts": 81995544874.914, "ph": "X", "cat": "fee", "dur": 12.61, "name": "BaseEventLoop.call_soon (/usr/lib/python3.12/asyncio/base_events.py:785)"}, {"pid": 222311, "tid": 222311, "ts": 81995544848.762, "ph": "X", "cat": "fee", "dur": 40.39, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544845.448, "ph": "X", "cat": "fee", "dur": 44.622, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544813.112, "ph": "X", "cat": "fee", "dur": 79.433, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995544894.671, "ph": "X", "cat": "fee", "dur": 0.217, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544896.982, "ph": "X", "cat": "fee", "dur": 0.244, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544897.635, "ph": "X", "cat": "fee", "dur": 1.114, "name": "builtins.max"}, {"pid": 222311, "tid": 222311, "ts": 81995544899.331, "ph": "X", "cat": "fee", "dur": 1.947, "name": "select.epoll.poll"}, {"pid": 222311, "tid": 222311, "ts": 81995544896.649, "ph": "X", "cat": "fee", "dur": 5.526, "name": "EpollSelector.select (/usr/lib/python3.12/selectors.py:451)"}, {"pid": 222311, "tid": 222311, "ts": 81995544903.168, "ph": "X", "cat": "fee", "dur": 0.549, "name": "BaseSelectorEventLoop._process_events (/usr/lib/python3.12/asyncio/selector_events.py:750)"}, {"pid": 222311, "tid": 222311, "ts": 81995544904.909, "ph": "X", "cat": "fee", "dur": 0.615, "name": "time.monotonic"}, {"pid": 222311, "tid": 222311, "ts": 81995544904.722, "ph": "X", "cat": "fee", "dur": 0.984, "name": "BaseEventLoop.time (/usr/lib/python3.12/asyncio/base_events.py:734)"}, {"pid": 222311, "tid": 222311, "ts": 81995544906.765, "ph": "X", "cat": "fee", "dur": 0.508, "name": "builtins.len"}, {"pid": 222311, "tid": 222311, "ts": 81995544908.987, "ph": "X", "cat": "fee", "dur": 0.512, "name": "collections.deque.popleft"}, {"pid": 222311, "tid": 222311, "ts": 81995544924.86, "ph": "X", "cat": "fee", "dur": 0.671, "name": "_asyncio.Task.cancelled"}, {"pid": 222311, "tid": 222311, "ts": 81995544927.054, "ph": "X", "cat": "fee", "dur": 0.706, "name": "_asyncio.Task.exception"}, {"pid": 222311, "tid": 222311, "ts": 81995544930.199, "ph": "X", "cat": "fee", "dur": 1.899, "name": "builtins.isinstance"}, {"pid": 222311, "tid": 222311, "ts": 81995544935.918, "ph": "X", "cat": "fee", "dur": 0.507, "name": "_asyncio.Task.get_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544934.709, "ph": "X", "cat": "fee", "dur": 2.097, "name": "_get_loop (/usr/lib/python3.12/asyncio/futures.py:299)"}, {"pid": 222311, "tid": 222311, "ts": 81995544938.618, "ph": "X", "cat": "fee", "dur": 0.802, "name": "BaseEventLoop.stop (/usr/lib/python3.12/asyncio/base_events.py:689)"}, {"pid": 222311, "tid": 222311, "ts": 81995544923.737, "ph": "X", "cat": "fee", "dur": 16.181, "name": "_run_until_complete_cb (/usr/lib/python3.12/asyncio/base_events.py:182)"}, {"pid": 222311, "tid": 222311, "ts": 81995544922.704, "ph": "X", "cat": "fee", "dur": 17.712, "name": "_contextvars.Context.run"}, {"pid": 222311, "tid": 222311, "ts": 81995544920.257, "ph": "X", "cat": "fee", "dur": 20.841, "name": "Handle._run (/usr/lib/python3.12/asyncio/events.py:86)"}, {"pid": 222311, "tid": 222311, "ts": 81995544894.359, "ph": "X", "cat": "fee", "dur": 48.257, "name": "BaseEventLoop._run_once (/usr/lib/python3.12/asyncio/base_events.py:1910)"}, {"pid": 222311, "tid": 222311, "ts": 81995544945.099, "ph": "X", "cat": "fee", "dur": 0.976, "name": "_asyncio._set_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544947.501, "ph": "X", "cat": "fee", "dur": 2.049, "name": "BaseEventLoop._set_coroutine_origin_tracking (/usr/lib/python3.12/asyncio/base_events.py:1990)"}, {"pid": 222311, "tid": 222311, "ts": 81995544951.906, "ph": "X", "cat": "fee", "dur": 9.887, "name": "sys.set_asyncgen_hooks"}, {"pid": 222311, "tid": 222311, "ts": 81995544700.639, "ph": "X", "cat": "fee", "dur": 261.829, "name": "BaseEventLoop.run_forever (/usr/lib/python3.12/asyncio/base_events.py:627)"}, {"pid": 222311, "tid": 222311, "ts": 81995544964.44, "ph": "X", "cat": "fee", "dur": 1.06, "name": "_asyncio.Task.remove_done_callback"}, {"pid": 222311, "tid": 222311, "ts": 81995544967.154, "ph": "X", "cat": "fee", "dur": 0.563, "name": "_asyncio.Task.done"}, {"pid": 222311, "tid": 222311, "ts": 81995544969.082, "ph": "X", "cat": "fee", "dur": 0.506, "name": "_asyncio.Task.result"}, {"pid": 222311, "tid": 222311, "ts": 81995544626.09, "ph": "X", "cat": "fee", "dur": 344.231, "name": "BaseEventLoop.run_until_complete (/usr/lib/python3.12/asyncio/base_events.py:651)"}, {"pid": 222311, "tid": 222311, "ts": 81995544977.798, "ph": "X", "cat": "fee", "dur": 0.491, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544979.507, "ph": "X", "cat": "fee", "dur": 0.516, "name": "BaseEventLoop.is_running (/usr/lib/python3.12/asyncio/base_events.py:730)"}, {"pid": 222311, "tid": 222311, "ts": 81995544980.545, "ph": "X", "cat": "fee", "dur": 0.784, "name": "_asyncio._get_running_loop"}, {"pid": 222311, "tid": 222311, "ts": 81995544979.055, "ph": "X", "cat": "fee", "dur": 2.536, "name": "BaseEventLoop._check_running (/usr/lib/python3.12/asyncio/base_events.py:620)"}, {"pid": 222311, "tid": 222311, "ts": 81995544983.908, "ph": "X", "cat": "fee", "dur": 0.482, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995544982.766, "ph": "X", "cat": "fee", "dur": 2.111, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995544987.62, "ph": "X", "cat": "fee", "dur": 0.388, "name": "builtins.hasattr"}, {"pid": 222311, "tid": 222311, "ts": 81995544987.179, "ph": "X", "cat": "fee", "dur": 1.008, "name": "isfuture (/usr/lib/python3.12/asyncio/base_futures.py:13)"}, {"pid": 222311, "tid": 222311, "ts": 81995544989.618, "ph": "X", "cat": "fee", "dur": 1.268, "name": "iscoroutine (/usr/lib/python3.12/asyncio/coroutines.py:32)"}, {"pid": 222311, "tid": 222311, "ts": 81995544993.392, "ph": "X", "cat": "fee", "dur": 0.314, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995544996.973, "ph": "X", "cat": "fee", "dur": 0.411, "name": "BaseEventLoop.get_debug (/usr/lib/python3.12/asyncio/base_events.py:2005)"}, {"pid": 222311, "tid": 222311, "ts": 81995545000.121, "ph": "X", "cat": "fee", "dur": 0.263, "name": "BaseEventLoop._check_closed (/usr/lib/python3.12/asyncio/base_events.py:539)"}, {"pid": 222311, "tid": 222311, "ts": 81995545004.202, "ph": "X", "cat": "fe
Download .txt
gitextract_o58d0in3/

├── .coveragerc
├── .gitattributes
├── .github/
│   ├── CONTRIBUTING.md
│   ├── FUNDING.yml
│   └── workflows/
│       ├── docs.yml
│       ├── lint.yml
│       ├── python-package.yml
│       ├── release.yml
│       └── wheels.yml
├── .gitignore
├── .readthedocs.yml
├── CITATION.cff
├── LICENSE
├── MANIFEST.in
├── Makefile
├── NOTICE.txt
├── README.md
├── docs/
│   ├── Makefile
│   ├── make.bat
│   ├── requirements.txt
│   └── source/
│       ├── basic_usage.rst
│       ├── concurrency.rst
│       ├── conf.py
│       ├── contact.rst
│       ├── custom_event.rst
│       ├── custom_event_intro.rst
│       ├── decorator.rst
│       ├── extra_log.rst
│       ├── filter.rst
│       ├── global_tracer.rst
│       ├── index.rst
│       ├── installation.rst
│       ├── license.rst
│       ├── limitations.rst
│       ├── plugins.rst
│       ├── remote_attach.rst
│       ├── sponsor.rst
│       ├── viz_plugin.rst
│       └── viztracer.rst
├── example/
│   ├── generate_examples.py
│   ├── json/
│   │   ├── async_simple.json
│   │   ├── different_sorts.json
│   │   ├── function_args_return.json
│   │   ├── gradient_descent.json
│   │   ├── logging_integration.json
│   │   ├── mcts_game.json
│   │   ├── multi_process_pool.json
│   │   └── multithread.json
│   ├── requirements.txt
│   └── src/
│       ├── async_simple.py
│       ├── different_sorts.py
│       ├── function_args_return.py
│       ├── gradient_descent.py
│       ├── logging_integration.py
│       ├── mcts_game.py
│       ├── multi_process_pool.py
│       └── multithread.py
├── pyproject.toml
├── requirements-dev.txt
├── setup.py
├── src/
│   └── viztracer/
│       ├── __init__.py
│       ├── __main__.py
│       ├── attach.py
│       ├── attach_process/
│       │   ├── LICENSE
│       │   ├── README.txt
│       │   ├── __init__.py
│       │   ├── add_code_to_python_process.py
│       │   └── linux_and_mac/
│       │       └── lldb_prepare.py
│       ├── cellmagic.py
│       ├── code_monkey.py
│       ├── decorator.py
│       ├── event_base.py
│       ├── functree.py
│       ├── html/
│       │   ├── LICENSE
│       │   ├── README.md
│       │   ├── flamegraph.html
│       │   ├── trace_viewer_embedder.html
│       │   └── trace_viewer_full.html
│       ├── main.py
│       ├── modules/
│       │   ├── eventnode.c
│       │   ├── eventnode.h
│       │   ├── pythoncapi_compat.h
│       │   ├── quicktime.c
│       │   ├── quicktime.h
│       │   ├── snaptrace.c
│       │   ├── snaptrace.h
│       │   ├── snaptrace_member.c
│       │   ├── util.c
│       │   ├── util.h
│       │   └── vcompressor/
│       │       ├── README.md
│       │       ├── vc_dump.c
│       │       ├── vc_dump.h
│       │       ├── vcompressor.c
│       │       └── vcompressor.h
│       ├── patch.py
│       ├── report_builder.py
│       ├── report_server.py
│       ├── snaptrace.pyi
│       ├── util.py
│       ├── vcompressor.pyi
│       ├── viewer.py
│       ├── vizcounter.py
│       ├── vizevent.py
│       ├── vizlogging.py
│       ├── vizobject.py
│       ├── vizplugin.py
│       ├── viztracer.py
│       └── web_dist/
│           ├── LICENSE
│           ├── index.html
│           ├── service_worker.js
│           ├── trace_processor
│           └── v52.0-6b9586def/
│               ├── assets/
│               │   ├── catapult_trace_viewer.html
│               │   └── catapult_trace_viewer.js
│               ├── engine_bundle.js
│               ├── frontend_bundle.js
│               ├── index.html
│               ├── manifest.json
│               ├── perfetto.css
│               ├── stdlib_docs.json
│               ├── trace_config_utils.wasm
│               ├── trace_processor.wasm
│               ├── trace_processor_memory64.wasm
│               ├── traceconv.wasm
│               └── traceconv_bundle.js
└── tests/
    ├── __init__.py
    ├── base_tmpl.py
    ├── cmdline_tmpl.py
    ├── data/
    │   ├── fib.py
    │   ├── vdb_basic.py
    │   └── vdb_multithread.py
    ├── modules/
    │   ├── __init__.py
    │   ├── dummy_vizplugin.py
    │   ├── dummy_vizplugin_wrong.py
    │   ├── issue160.py
    │   ├── issue58.py
    │   └── issue83.py
    ├── package_env.py
    ├── test_basic.py
    ├── test_cmdline.py
    ├── test_codemonkey.py
    ├── test_fastlog.py
    ├── test_functree.py
    ├── test_invalid.py
    ├── test_jupyter.py
    ├── test_logging.py
    ├── test_logsparse.py
    ├── test_multiprocess.py
    ├── test_multithread.py
    ├── test_patch.py
    ├── test_performance.py
    ├── test_regression.py
    ├── test_remote.py
    ├── test_report_builder.py
    ├── test_report_server.py
    ├── test_torch.py
    ├── test_tracer.py
    ├── test_util.py
    ├── test_vcompressor.py
    ├── test_viewer.py
    ├── test_vizcounter.py
    ├── test_vizevent.py
    ├── test_vizobject.py
    ├── test_vizplugin.py
    └── util.py
Download .txt
Showing preview only (927K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (9108 symbols across 85 files)

FILE: example/generate_examples.py
  function generate_by_script (line 5) | def generate_by_script(script):
  function generate_by_vt (line 10) | def generate_by_vt(script, options):

FILE: example/src/async_simple.py
  function io_task (line 4) | async def io_task():
  function main (line 8) | async def main():

FILE: example/src/different_sorts.py
  function merge_sort (line 10) | def merge_sort(collection):
  function quick_sort (line 45) | def quick_sort(collection):
  function heapify (line 79) | def heapify(unsorted, index, heap_size):
  function heap_sort (line 94) | def heap_sort(unsorted):

FILE: example/src/function_args_return.py
  function fib (line 6) | def fib(n):

FILE: example/src/gradient_descent.py
  function _error (line 25) | def _error(example_no, data_set="train"):
  function _hypothesis_value (line 36) | def _hypothesis_value(data_input_tuple):
  function output (line 52) | def output(example_no, data_set):
  function calculate_hypothesis_value (line 64) | def calculate_hypothesis_value(example_no, data_set):
  function summation_of_cost_derivative (line 77) | def summation_of_cost_derivative(index, end=m):
  function get_cost_derivative (line 95) | def get_cost_derivative(index):
  function run_gradient_descent (line 106) | def run_gradient_descent():
  function test_gradient_descent (line 134) | def test_gradient_descent():

FILE: example/src/logging_integration.py
  function fib (line 7) | def fib(n):

FILE: example/src/mcts_game.py
  class NaughtsAndCrossesState (line 10) | class NaughtsAndCrossesState:
    method __init__ (line 11) | def __init__(self):
    method getCurrentPlayer (line 15) | def getCurrentPlayer(self):
    method getPossibleActions (line 18) | def getPossibleActions(self):
    method takeAction (line 26) | def takeAction(self, action):
    method isTerminal (line 32) | def isTerminal(self):
    method getReward (line 47) | def getReward(self):
  class Action (line 63) | class Action:
    method __init__ (line 64) | def __init__(self, player, x, y):
    method __str__ (line 69) | def __str__(self):
    method __repr__ (line 72) | def __repr__(self):
    method __eq__ (line 75) | def __eq__(self, other):
    method __hash__ (line 83) | def __hash__(self):

FILE: example/src/multi_process_pool.py
  function f (line 5) | def f(x):

FILE: example/src/multithread.py
  function fib (line 8) | def fib(n):
  class MyThread (line 15) | class MyThread(threading.Thread):
    method run (line 16) | def run(self):

FILE: src/viztracer/attach.py
  class AttachStatus (line 16) | class AttachStatus:
  function start_attach (line 25) | def start_attach(init_kwargs_b64: str) -> None:
  function stop_attach (line 43) | def stop_attach() -> None:
  function uninstall_attach (line 60) | def uninstall_attach():

FILE: src/viztracer/attach_process/add_code_to_python_process.py
  class TimeoutError (line 88) | class TimeoutError(RuntimeError):  # @ReservedAssignment
  function _create_win_event (line 93) | def _create_win_event(name):
  function is_python_64bit (line 134) | def is_python_64bit():
  function get_target_filename (line 138) | def get_target_filename(is_target_process_64=None, prefix=None, extensio...
  function run_python_code_windows (line 264) | def run_python_code_windows(pid, python_code, connect_debugger_tracing=F...
  function _acquire_mutex (line 317) | def _acquire_mutex(mutex_name, timeout):
  function _win_write_to_shared_named_memory (line 342) | def _win_write_to_shared_named_memory(python_code, pid):
  function run_python_code_linux (line 392) | def run_python_code_linux(pid, python_code, connect_debugger_tracing=Fal...
  function find_helper_script (line 450) | def find_helper_script(filedir, script_name):
  function run_python_code_mac (line 459) | def run_python_code_mac(pid, python_code, connect_debugger_tracing=False...
  function run_python_code (line 526) | def run_python_code(*args, **kwargs):
  function test (line 533) | def test():
  function main (line 562) | def main(args):

FILE: src/viztracer/attach_process/linux_and_mac/lldb_prepare.py
  function load_lib_and_attach (line 6) | def load_lib_and_attach(debugger, command, result, internal_dict):
  function __lldb_init_module (line 36) | def __lldb_init_module(debugger, internal_dict):

FILE: src/viztracer/cellmagic.py
  function load_ipython_extension (line 5) | def load_ipython_extension(ipython) -> None:

FILE: src/viztracer/code_monkey.py
  class AstTransformer (line 13) | class AstTransformer(ast.NodeTransformer):
    method __init__ (line 14) | def __init__(self, inst_type: str, inst_args: dict[str, dict]) -> None:
    method visit_Assign (line 21) | def visit_Assign(self, node: ast.Assign) -> ast.stmt | list[ast.stmt]:
    method visit_AugAssign (line 24) | def visit_AugAssign(self, node: ast.AugAssign) -> ast.stmt | list[ast....
    method visit_AnnAssign (line 27) | def visit_AnnAssign(self, node: ast.AnnAssign) -> ast.stmt | list[ast....
    method visit_FunctionDef (line 30) | def visit_FunctionDef(self, node: ast.FunctionDef) -> ast.FunctionDef:
    method visit_For (line 67) | def visit_For(self, node: ast.For) -> ast.For:
    method visit_Raise (line 78) | def visit_Raise(self, node: ast.Raise) -> ast.AST | list[ast.AST]:
    method _visit_generic_assign (line 84) | def _visit_generic_assign(
    method get_assign_targets (line 102) | def get_assign_targets(self, node: ast.expr) -> list[str]:
    method get_assign_targets_with_attr (line 123) | def get_assign_targets_with_attr(self, node: ast.AST) -> list[ast.Attr...
    method get_assign_log_nodes (line 145) | def get_assign_log_nodes(self, target: ast.expr) -> list[ast.stmt]:
    method get_instrument_node (line 180) | def get_instrument_node(self, trigger: str, name: str) -> ast.Expr:
    method get_instrument_node_by_node (line 206) | def get_instrument_node_by_node(
    method get_add_variable_node (line 222) | def get_add_variable_node(
    method get_add_func_exec_node (line 242) | def get_add_func_exec_node(self, name: str, val: ast.AST, lineno: int)...
    method copy_node_with_load (line 260) | def copy_node_with_load(self, node: ast.expr) -> ast.expr:
    method get_string_of_expr (line 271) | def get_string_of_expr(self, node: ast.expr | ast.slice) -> str:
  class SourceProcessor (line 323) | class SourceProcessor:
    method process (line 328) | def process(self, source: Any):
    method line_transform (line 347) | def line_transform(self, re_match: re.Match) -> str:
    method line_transform_condition (line 350) | def line_transform_condition(self, re_match: re.Match) -> str:
    method inline_transform (line 353) | def inline_transform(self, re_match: re.Match) -> str:
    method inline_transform_condition (line 360) | def inline_transform_condition(self, re_match: re.Match) -> str:
  class CodeMonkey (line 385) | class CodeMonkey:
    method __init__ (line 386) | def __init__(self, file_name: str) -> None:
    method add_instrument (line 392) | def add_instrument(self, inst_type: str, inst_args: dict[str, dict]) -...
    method add_source_processor (line 395) | def add_source_processor(self) -> None:
    method compile (line 398) | def compile(

FILE: src/viztracer/decorator.py
  function ignore_function (line 16) | def ignore_function(
  function ignore_function (line 23) | def ignore_function(
  function ignore_function (line 29) | def ignore_function(
  function trace_and_save (line 54) | def trace_and_save(
  function trace_and_save (line 61) | def trace_and_save(
  function trace_and_save (line 67) | def trace_and_save(
  function _log_sparse_wrapper (line 99) | def _log_sparse_wrapper(
  function log_sparse (line 152) | def log_sparse(
  function log_sparse (line 159) | def log_sparse(
  function log_sparse (line 165) | def log_sparse(

FILE: src/viztracer/event_base.py
  class _EventBase (line 10) | class _EventBase:
    method __init__ (line 11) | def __init__(self, tracer: VizTracer, name: str = "", **kwargs) -> None:
    method __setattr__ (line 27) | def __setattr__(self, name: str, value: Any) -> None:
    method _viztracer_get_attr_list (line 40) | def _viztracer_get_attr_list(self) -> list[str]:
    method _viztracer_set_config (line 51) | def _viztracer_set_config(self, key: str, value: Any) -> None:
    method config (line 56) | def config(self, key: str, value: Any) -> None:
    method _viztracer_log (line 59) | def _viztracer_log(self) -> None:
    method log (line 62) | def log(self) -> None:
    method triggerlog (line 66) | def triggerlog(

FILE: src/viztracer/functree.py
  class FuncTreeNode (line 10) | class FuncTreeNode:
    method __init__ (line 13) | def __init__(self, event: dict[str, Any] | None = None) -> None:
    method is_ancestor (line 38) | def is_ancestor(self, other: "FuncTreeNode") -> bool:
    method is_same (line 41) | def is_same(self, other: "FuncTreeNode") -> bool:
    method adopt (line 48) | def adopt(self, other: "FuncTreeNode") -> None:
  class FuncTree (line 100) | class FuncTree:  # pragma: no cover
    method __init__ (line 101) | def __init__(self, pid: int = 0, tid: int = 0) -> None:
    method is_same (line 107) | def is_same(self, other: "FuncTree") -> bool:
    method add_event (line 110) | def add_event(self, event: dict[str, Any]) -> None:
    method first_ts (line 116) | def first_ts(self) -> float:
    method first_node (line 119) | def first_node(self) -> FuncTreeNode:
    method node_by_timestamp (line 122) | def node_by_timestamp(self, ts: float) -> FuncTreeNode:
    method normalize (line 130) | def normalize(self, first_ts: float) -> None:
    method inorder_traverse (line 135) | def inorder_traverse(self) -> Generator[FuncTreeNode, None, None]:

FILE: src/viztracer/main.py
  class VizUI (line 41) | class VizUI:
    method __init__ (line 42) | def __init__(self) -> None:
    method create_parser (line 53) | def create_parser(self) -> argparse.ArgumentParser:
    method load_config_file (line 386) | def load_config_file(self, filename: str = ".viztracerrc") -> argparse...
    method parse (line 439) | def parse(self, argv: list[str]) -> VizProcedureResult:
    method search_file (line 560) | def search_file(self, file_name: str) -> str | None:
    method run (line 580) | def run(self) -> VizProcedureResult:
    method run_report_server (line 607) | def run_report_server(self) -> VizProcedureResult:
    method run_code (line 619) | def run_code(
    method run_module (line 675) | def run_module(self) -> VizProcedureResult:
    method run_string (line 687) | def run_string(self) -> VizProcedureResult:
    method run_command (line 699) | def run_command(self) -> VizProcedureResult:
    method run_compress (line 756) | def run_compress(self):
    method run_decompress (line 779) | def run_decompress(self):
    method run_combine (line 800) | def run_combine(self, files: list[str], align: bool = False) -> VizPro...
    method _check_attach_availability (line 813) | def _check_attach_availability(self) -> tuple[bool, str | None]:
    method attach (line 828) | def attach(self) -> VizProcedureResult:
    method uninstall (line 881) | def uninstall(self) -> VizProcedureResult:
    method attach_installed (line 904) | def attach_installed(self) -> VizProcedureResult:
    method _wait_attach (line 926) | def _wait_attach(self, interval: float) -> None:
    method exit_routine (line 941) | def exit_routine(self) -> None:
  function main (line 962) | def main():

FILE: src/viztracer/modules/eventnode.c
  function clear_node (line 10) | void
  function PyObject (line 61) | PyObject*
  function fputs_escape (line 122) | static void
  function fprintfeename (line 134) | void

FILE: src/viztracer/modules/eventnode.h
  type NodeType (line 9) | typedef enum _NodeType {
  type FEEData (line 18) | struct FEEData {
  type InstantData (line 34) | struct InstantData {
  type CounterData (line 40) | struct CounterData {
  type ObjectData (line 45) | struct ObjectData {
  type EventNode (line 52) | struct EventNode {
  type EventNode (line 68) | struct EventNode
  type EventNode (line 71) | struct EventNode
  type EventNode (line 72) | struct EventNode

FILE: src/viztracer/modules/pythoncapi_compat.h
  function PyObject (line 58) | static inline PyObject* _Py_NewRef(PyObject *obj)
  function PyObject (line 69) | static inline PyObject* _Py_XNewRef(PyObject *obj)
  function _Py_SET_REFCNT (line 80) | static inline void _Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt)
  function _Py_SET_TYPE (line 127) | static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
  function _Py_SET_SIZE (line 137) | static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)
  function PyCodeObject (line 147) | static inline PyCodeObject* PyFrame_GetCode(PyFrameObject *frame)
  function PyCodeObject (line 155) | static inline PyCodeObject* _PyFrame_GetCodeBorrow(PyFrameObject *frame)
  function PyFrameObject (line 165) | static inline PyFrameObject* PyFrame_GetBack(PyFrameObject *frame)
  function PyFrameObject (line 173) | static inline PyFrameObject* _PyFrame_GetBackBorrow(PyFrameObject *frame)
  function PyObject (line 184) | static inline PyObject* PyFrame_GetLocals(PyFrameObject *frame)
  function PyObject (line 200) | static inline PyObject* PyFrame_GetGlobals(PyFrameObject *frame)
  function PyObject (line 209) | static inline PyObject* PyFrame_GetBuiltins(PyFrameObject *frame)
  function PyFrame_GetLasti (line 218) | static inline int PyFrame_GetLasti(PyFrameObject *frame)
  function PyObject (line 237) | static inline PyObject* PyFrame_GetVar(PyFrameObject *frame, PyObject *n...
  function PyObject (line 270) | static inline PyObject*
  function PyInterpreterState (line 291) | static inline PyInterpreterState *
  function PyFrameObject (line 302) | static inline PyFrameObject* PyThreadState_GetFrame(PyThreadState *tstate)
  function PyFrameObject (line 310) | static inline PyFrameObject*
  function PyInterpreterState (line 322) | static inline PyInterpreterState* PyInterpreterState_Get(void)
  function PyThreadState_GetID (line 342) | static inline uint64_t PyThreadState_GetID(PyThreadState *tstate)
  function PyThreadState_EnterTracing (line 351) | static inline void PyThreadState_EnterTracing(PyThreadState *tstate)
  function PyThreadState_LeaveTracing (line 364) | static inline void PyThreadState_LeaveTracing(PyThreadState *tstate)
  function PyObject (line 381) | static inline PyObject* PyObject_CallNoArgs(PyObject *func)
  function PyObject (line 392) | static inline PyObject* PyObject_CallOneArg(PyObject *func, PyObject *arg)
  function PyModule_AddObjectRef (line 401) | static inline int
  function PyModule_AddType (line 426) | static inline int PyModule_AddType(PyObject *module, PyTypeObject *type)
  function PyObject_GC_IsTracked (line 450) | static inline int PyObject_GC_IsTracked(PyObject* obj)
  function PyObject_GC_IsFinalized (line 459) | static inline int PyObject_GC_IsFinalized(PyObject *obj)
  function _Py_IS_TYPE (line 469) | static inline int _Py_IS_TYPE(PyObject *ob, PyTypeObject *type) {
  function PyFloat_Pack2 (line 481) | static inline int PyFloat_Pack2(double x, char *p, int le)
  function PyFloat_Unpack2 (line 484) | static inline double PyFloat_Unpack2(const char *p, int le)
  function PyFloat_Pack4 (line 495) | static inline int PyFloat_Pack4(double x, char *p, int le)
  function PyFloat_Pack8 (line 498) | static inline int PyFloat_Pack8(double x, char *p, int le)
  function PyFloat_Unpack4 (line 501) | static inline double PyFloat_Unpack4(const char *p, int le)
  function PyFloat_Unpack8 (line 504) | static inline double PyFloat_Unpack8(const char *p, int le)
  function PyObject (line 511) | static inline PyObject* PyCode_GetCode(PyCodeObject *code)
  function PyObject (line 520) | static inline PyObject* PyCode_GetVarnames(PyCodeObject *code)
  function PyObject (line 528) | static inline PyObject* PyCode_GetFreevars(PyCodeObject *code)
  function PyObject (line 536) | static inline PyObject* PyCode_GetCellvars(PyCodeObject *code)
  function PyObject (line 555) | static inline PyObject* PyImport_AddModuleRef(const char *name)
  function PyWeakref_GetRef (line 564) | static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj)
  function Py_ssize_t (line 595) | static inline Py_ssize_t PyVectorcall_NARGS(size_t n)
  function PyObject (line 604) | static inline PyObject*
  function PyObject_GetOptionalAttr (line 680) | static inline int
  function PyObject_GetOptionalAttrString (line 702) | static inline int
  function PyMapping_GetOptionalItem (line 726) | static inline int
  function PyMapping_GetOptionalItemString (line 740) | static inline int
  function PyMapping_HasKeyWithError (line 763) | static inline int
  function PyMapping_HasKeyStringWithError (line 772) | static inline int
  function PyObject_HasAttrWithError (line 786) | static inline int
  function PyObject_HasAttrStringWithError (line 795) | static inline int
  function PyDict_GetItemRef (line 809) | static inline int
  function PyDict_GetItemStringRef (line 829) | static inline int
  function PyModule_Add (line 851) | static inline int
  function Py_IsFinalizing (line 866) | static inline int Py_IsFinalizing(void)
  function PyDict_ContainsString (line 880) | static inline int PyDict_ContainsString(PyObject *op, const char *key)
  function PyLong_AsInt (line 895) | static inline int PyLong_AsInt(PyObject *obj)
  function PyObject_VisitManagedDict (line 917) | static inline int
  function PyObject_ClearManagedDict (line 928) | static inline void
  function PyThreadState (line 942) | static inline PyThreadState*
  function PyUnicode_EqualToUTF8AndSize (line 952) | static inline int
  function PyUnicode_EqualToUTF8 (line 1015) | static inline int
  function PyList_Extend (line 1025) | static inline int
  function PyList_Clear (line 1031) | static inline int
  function PyDict_Pop (line 1040) | static inline int
  function PyDict_PopString (line 1082) | static inline int
  type Py_ssize_t (line 1102) | typedef Py_ssize_t Py_hash_t;
  function Py_hash_t (line 1108) | static inline Py_hash_t Py_HashPointer(const void *ptr)
  type _PyTime_t (line 1122) | typedef _PyTime_t PyTime_t;
  function PyTime_AsSecondsDouble (line 1126) | static inline double PyTime_AsSecondsDouble(PyTime_t t)
  function PyTime_Monotonic (line 1129) | static inline int PyTime_Monotonic(PyTime_t *result)
  function PyTime_Time (line 1132) | static inline int PyTime_Time(PyTime_t *result)
  function PyTime_PerfCounter (line 1135) | static inline int PyTime_PerfCounter(PyTime_t *result)
  function PyObject (line 1234) | static inline PyObject* Py_GetConstant(unsigned int constant_id)
  function PyObject (line 1287) | static inline PyObject* Py_GetConstantBorrowed(unsigned int constant_id)
  function PyObject (line 1298) | static inline PyObject *
  function PyDict_SetDefaultRef (line 1310) | static inline int
  type PyUnicodeWriter (line 1356) | typedef struct PyUnicodeWriter PyUnicodeWriter;
  function PyUnicodeWriter_Discard (line 1358) | static inline void PyUnicodeWriter_Discard(PyUnicodeWriter *writer)
  function PyUnicodeWriter (line 1364) | static inline PyUnicodeWriter* PyUnicodeWriter_Create(Py_ssize_t length)
  function PyObject (line 1389) | static inline PyObject* PyUnicodeWriter_Finish(PyUnicodeWriter *writer)
  function PyUnicodeWriter_WriteChar (line 1397) | static inline int
  function PyUnicodeWriter_WriteStr (line 1409) | static inline int
  function PyUnicodeWriter_WriteRepr (line 1422) | static inline int
  function PyUnicodeWriter_WriteUTF8 (line 1435) | static inline int
  function PyUnicodeWriter_WriteWideChar (line 1453) | static inline int
  function PyUnicodeWriter_WriteSubstring (line 1471) | static inline int
  function PyUnicodeWriter_Format (line 1492) | static inline int
  function PyLong_GetSign (line 1511) | static inline int PyLong_GetSign(PyObject *obj, int *sign)
  function PyLong_IsPositive (line 1525) | static inline int PyLong_IsPositive(PyObject *obj)
  function PyLong_IsNegative (line 1534) | static inline int PyLong_IsNegative(PyObject *obj)
  function PyLong_IsZero (line 1543) | static inline int PyLong_IsZero(PyObject *obj)
  function PyUnicode_Equal (line 1556) | static inline int PyUnicode_Equal(PyObject *str1, PyObject *str2)
  function PyObject (line 1586) | static inline PyObject* PyBytes_Join(PyObject *sep, PyObject *iterable)
  function Py_hash_t (line 1594) | static inline Py_hash_t Py_HashBuffer(const void *ptr, Py_ssize_t len)
  function PyIter_NextItem (line 1615) | static inline int PyIter_NextItem(PyObject *iter, PyObject **item)
  function PyObject (line 1646) | static inline PyObject* PyLong_FromInt32(int32_t value)
  function PyObject (line 1652) | static inline PyObject* PyLong_FromInt64(int64_t value)
  function PyObject (line 1658) | static inline PyObject* PyLong_FromUInt32(uint32_t value)
  function PyObject (line 1664) | static inline PyObject* PyLong_FromUInt64(uint64_t value)
  function PyLong_AsInt32 (line 1670) | static inline int PyLong_AsInt32(PyObject *obj, int32_t *pvalue)
  function PyLong_AsInt64 (line 1681) | static inline int PyLong_AsInt64(PyObject *obj, int64_t *pvalue)
  function PyLong_AsUInt32 (line 1692) | static inline int PyLong_AsUInt32(PyObject *obj, uint32_t *pvalue)
  function PyLong_AsUInt64 (line 1710) | static inline int PyLong_AsUInt64(PyObject *obj, uint64_t *pvalue)

FILE: src/viztracer/modules/quicktime.c
  function compare_double (line 34) | static int
  function compare_int64 (line 40) | static int
  function calibrate_quicktime (line 46) | static void
  function system_ts_to_us (line 71) | double
  function system_ts_to_ns (line 82) | int64_t
  function dur_ts_to_us (line 93) | double
  function dur_ts_to_ns (line 104) | int64_t
  function quicktime_free (line 115) | void
  function quicktime_init (line 122) | void

FILE: src/viztracer/modules/quicktime.h
  function get_base_time_ns (line 44) | inline int64_t
  function get_system_ts (line 50) | inline int64_t
  function get_system_ns (line 70) | inline int64_t
  function get_system_epoch_ns (line 87) | inline int64_t

FILE: src/viztracer/modules/snaptrace.c
  function get_ts (line 45) | static inline int64_t
  type EventNode (line 68) | struct EventNode
  type EventNode (line 71) | struct EventNode
  function log_func_args (line 94) | static void
  function verbose_printf (line 151) | static void
  function clear_stack (line 163) | void
  type ThreadInfo (line 178) | struct ThreadInfo
  type ThreadInfo (line 180) | struct ThreadInfo
  type ThreadInfo (line 180) | struct ThreadInfo
  type FunctionNode (line 181) | struct FunctionNode
  type FunctionNode (line 181) | struct FunctionNode
  type MetadataNode (line 222) | struct MetadataNode
  type MetadataNode (line 238) | struct MetadataNode
  type MetadataNode (line 238) | struct MetadataNode
  type ThreadInfo (line 263) | struct ThreadInfo
  type ThreadInfo (line 267) | struct ThreadInfo
  function snaptrace_threaddestructor (line 279) | static void
  function prepare_before_trace (line 320) | int
  function tracer_pycall_callback (line 362) | int
  function tracer_ccall_callback (line 463) | int
  function tracer_pyreturn_callback (line 506) | int
  function tracer_creturn_callback (line 596) | int
  function tracer_tracefunc (line 681) | int
  function PyObject (line 717) | static PyObject*
  function PyObject (line 748) | PyObject* get_cfunc_from_callable(PyObject* callable, PyObject* self_arg)
  function PyObject (line 781) | PyObject*
  function PyObject (line 792) | PyObject*
  function PyObject (line 804) | PyObject*
  function PyObject (line 820) | PyObject*
  function enable_monitoring (line 862) | int
  function disable_monitoring (line 924) | int disable_monitoring(TracerObject* self)
  function tracer__flush_unfinished (line 990) | static void
  function PyObject (line 1066) | static PyObject*
  function PyObject (line 1097) | static PyObject*
  function PyObject (line 1137) | static PyObject*
  function PyObject (line 1167) | static PyObject*
  function PyObject (line 1193) | static PyObject*
  function PyObject (line 1473) | static PyObject*
  function PyObject (line 1698) | static PyObject*
  function PyObject (line 1715) | static PyObject*
  function PyObject (line 1736) | static PyObject*
  function PyObject (line 1745) | static PyObject*
  function PyObject (line 1751) | static PyObject*
  function PyObject (line 1770) | static PyObject*
  function PyObject (line 1829) | static PyObject*
  function PyObject (line 1860) | static PyObject*
  function PyObject (line 1894) | static PyObject*
  function PyObject (line 1936) | static PyObject*
  function PyObject (line 1962) | static PyObject*
  function PyObject (line 1987) | static PyObject*
  function PyObject (line 2005) | static PyObject*
  function PyObject (line 2016) | static PyObject*
  function PyObject (line 2057) | static PyObject*
  function Tracer_Init (line 2082) | static int
  function Tracer_dealloc (line 2113) | static void
  function snaptrace_free (line 2161) | void
  type PyModuleDef (line 2179) | struct PyModuleDef
  function PyMODINIT_FUNC (line 2190) | PyMODINIT_FUNC

FILE: src/viztracer/modules/snaptrace.h
  type FunctionNode (line 70) | struct FunctionNode {
  type ThreadInfo (line 79) | struct ThreadInfo {
  type MetadataNode (line 90) | struct MetadataNode {
  type TracerObject (line 97) | typedef struct {

FILE: src/viztracer/modules/snaptrace_member.c
  function Tracer_max_stack_depth_setter (line 15) | static int
  function PyObject (line 38) | static PyObject*
  function Tracer_include_files_setter (line 44) | static int
  function PyObject (line 68) | static PyObject*
  function Tracer_exclude_files_setter (line 78) | static int
  function PyObject (line 102) | static PyObject*
  function Tracer_ignore_c_function_setter (line 112) | static int
  function PyObject (line 133) | static PyObject*
  function Tracer_ignore_frozen_setter (line 143) | static int
  function PyObject (line 164) | static PyObject*
  function Tracer_verbose_setter (line 174) | static int
  function PyObject (line 191) | static PyObject*
  function Tracer_lib_file_path_setter (line 197) | static int
  function PyObject (line 230) | static PyObject*
  function Tracer_process_name_setter (line 236) | static int
  function PyObject (line 259) | static PyObject*
  function Tracer_min_duration_setter (line 268) | static int
  function PyObject (line 296) | static PyObject*
  function Tracer_log_func_args_setter (line 302) | static int
  function PyObject (line 323) | static PyObject*
  function Tracer_log_func_retval_setter (line 333) | static int
  function PyObject (line 354) | static PyObject*
  function Tracer_log_async_setter (line 364) | static int
  function PyObject (line 393) | static PyObject*
  function Tracer_trace_self_setter (line 403) | static int
  function PyObject (line 424) | static PyObject*
  function Tracer_log_func_repr_setter (line 434) | static int
  function PyObject (line 458) | static PyObject*

FILE: src/viztracer/modules/util.c
  function Print_Py (line 11) | void
  function fprintjson (line 19) | void
  function fprint_escape (line 29) | void

FILE: src/viztracer/modules/util.h
  function startswith (line 16) | inline int startswith(const char* target, const char* prefix)

FILE: src/viztracer/modules/vcompressor/vc_dump.c
  function write_encoded_int (line 72) | static inline void
  function read_encoded_int (line 90) | static inline int
  function freadstrn (line 128) | int
  function dump_metadata (line 173) | int
  function PyObject (line 187) | PyObject*
  function PyObject (line 233) | PyObject*
  function PyObject (line 274) | PyObject*
  function PyObject (line 312) | PyObject*
  function json_dumps_and_compress_to_file (line 350) | int
  function PyObject (line 390) | PyObject*
  function dump_parsed_trace_events (line 457) | int
  function write_fee_events (line 531) | int
  function PyObject (line 595) | PyObject*
  function diff_and_write_counter_args (line 684) | int
  function PyObject (line 850) | PyObject*
  function PyObject (line 979) | PyObject*
  function dump_file_info (line 1115) | int
  function PyObject (line 1127) | PyObject*

FILE: src/viztracer/modules/vcompressor/vcompressor.c
  function PyObject (line 11) | static PyObject*
  function vcompressor_dealloc (line 18) | static void
  function PyObject (line 24) | static PyObject*
  function PyObject (line 224) | static PyObject* vcompressor_compress(VcompressorObject* self, PyObject*...
  function PyObject (line 297) | static PyObject*
  type PyModuleDef (line 343) | struct PyModuleDef
  function PyMODINIT_FUNC (line 364) | PyMODINIT_FUNC

FILE: src/viztracer/modules/vcompressor/vcompressor.h
  type VcompressorObject (line 8) | typedef struct {

FILE: src/viztracer/patch.py
  function patch_subprocess (line 23) | def patch_subprocess(viz_args: list[str]) -> None:
  function patch_multiprocessing (line 156) | def patch_multiprocessing(tracer: VizTracer, viz_args: list[str]) -> None:
  class SpawnProcess (line 246) | class SpawnProcess:
    method __init__ (line 247) | def __init__(
    method run (line 264) | def run(self) -> None:
  function patch_spawned_process (line 273) | def patch_spawned_process(viztracer_kwargs: dict[str, Any], cmdline_args...
  class HookManager (line 303) | class HookManager:
    method __new__ (line 306) | def __new__(cls):
    method set_tracer (line 313) | def set_tracer(self, tracer: VizTracer | None) -> None:
    method install_hooks (line 317) | def install_hooks(self):
    method _after_fork (line 324) | def _after_fork(self):
    method _audit_callback (line 339) | def _audit_callback(self, event: str, args: Any) -> None:  # pragma: n...
  function install_all_hooks (line 356) | def install_all_hooks(tracer: VizTracer) -> None:
  function uninstall_all_hooks (line 369) | def uninstall_all_hooks() -> None:

FILE: src/viztracer/report_builder.py
  function get_json (line 21) | def get_json(data: dict[str, Any] | str | tuple[str, dict]) -> dict[str,...
  class ReportBuilder (line 65) | class ReportBuilder:
    method __init__ (line 66) | def __init__(
    method load_jsons (line 100) | def load_jsons(self) -> None:
    method combine_json (line 123) | def combine_json(self) -> None:
    method align_events (line 161) | def align_events(
    method prepare_json (line 182) | def prepare_json(
    method get_source_from_filename (line 232) | def get_source_from_filename(cls, filename: str) -> str | None:
    method generate_report (line 252) | def generate_report(
    method save (line 291) | def save(
    method print_messages (line 322) | def print_messages(self):

FILE: src/viztracer/report_server.py
  class ReportServer (line 19) | class ReportServer:
    method __init__ (line 20) | def __init__(
    method start_process (line 61) | def start_process(
    method __del__ (line 88) | def __del__(self) -> None:
    method run (line 91) | def run(self) -> None:
    method clear (line 99) | def clear(self) -> None:
    method endpoint (line 111) | def endpoint(self) -> str:
    method collect (line 114) | def collect(self):
    method _recv_info (line 175) | def _recv_info(self, conn: socket.socket) -> None:
    method save (line 190) | def save(self) -> None:

FILE: src/viztracer/snaptrace.pyi
  class Tracer (line 6) | class Tracer:
    method __init__ (line 12) | def __init__(self, tracer_entries: int, /) -> None: ...
    method start (line 13) | def start(self) -> None: ...
    method stop (line 14) | def stop(self, stop_option: str | None) -> None: ...
    method resume (line 15) | def resume(self) -> None: ...
    method pause (line 16) | def pause(self) -> None: ...
    method clear (line 17) | def clear(self) -> None: ...
    method load (line 18) | def load(self) -> dict[str, Any]: ...
    method dump (line 19) | def dump(self, filename: str, sanitize_function_name: bool = False) ->...
    method setignorestackcounter (line 20) | def setignorestackcounter(self, value: int) -> int: ...
    method reset_stack (line 21) | def reset_stack(self) -> None: ...
    method getts (line 22) | def getts(self) -> float: ...
    method get_base_time (line 23) | def get_base_time(self) -> int: ...
    method setpid (line 24) | def setpid(self, pid: int = -1, /) -> None: ...
    method add_func_args (line 25) | def add_func_args(self, key: str, value: Any) -> None: ...
    method get_func_args (line 26) | def get_func_args(self) -> dict[str, Any] | None: ...
    method add_raw (line 27) | def add_raw(self, raw: dict[str, Any]) -> None: ...
    method add_object (line 28) | def add_object(
    method add_counter (line 31) | def add_counter(self, name: str, args: dict[str, Any]) -> None: ...
    method add_instant (line 32) | def add_instant(
    method set_sync_marker (line 35) | def set_sync_marker(self) -> None:
    method get_sync_marker (line 39) | def get_sync_marker(self) -> float | None:

FILE: src/viztracer/util.py
  function size_fmt (line 18) | def size_fmt(num: int | float, suffix: str = "B") -> str:
  class _bcolors (line 26) | class _bcolors:
  function color_print (line 55) | def color_print(color, s: str, **kwargs) -> None:
  function set_same_line_print_end (line 65) | def set_same_line_print_end(end: str) -> None:
  function same_line_print (line 70) | def same_line_print(s: str, width: int = 80, **kwargs) -> None:
  function unique_file_name (line 75) | def unique_file_name(exec_name: str) -> str:
  function unique_path (line 93) | def unique_path(directory: str, suffix=".json") -> str | None:
  function compare_version (line 102) | def compare_version(ver1: str, ver2: str) -> int:
  function time_str_to_us (line 119) | def time_str_to_us(t_s: str) -> float:
  function pid_exists (line 144) | def pid_exists(pid):
  function frame_stack_has_func (line 212) | def frame_stack_has_func(frame, funcs):

FILE: src/viztracer/vcompressor.pyi
  class VCompressor (line 4) | class VCompressor:
    method compress (line 5) | def compress(self, raw_data: dict, filename: str) -> dict: ...
    method decompress (line 6) | def decompress(self, filename: str) -> dict: ...

FILE: src/viztracer/viewer.py
  function chdir_temp (line 29) | def chdir_temp(d: str):
  class HttpHandler (line 39) | class HttpHandler(http.server.SimpleHTTPRequestHandler):
    method end_headers (line 40) | def end_headers(self):
    method log_message (line 45) | def log_message(self, format, *args):
  class ExternalProcessorHandler (line 50) | class ExternalProcessorHandler(HttpHandler):
    method __init__ (line 51) | def __init__(self, server_thread: "ServerThread", *args, **kwargs) -> ...
    method do_GET (line 55) | def do_GET(self):
  class PerfettoHandler (line 63) | class PerfettoHandler(HttpHandler):
    method __init__ (line 64) | def __init__(self, server_thread: "ServerThread", *args, **kwargs) -> ...
    method do_GET (line 68) | def do_GET(self):
  class HtmlHandler (line 100) | class HtmlHandler(HttpHandler):
    method __init__ (line 101) | def __init__(self, server_thread: "ServerThread", *args, **kwargs) -> ...
    method do_GET (line 105) | def do_GET(self):
  class DirectoryHandler (line 114) | class DirectoryHandler(HttpHandler):
    method __init__ (line 115) | def __init__(self, directory_viewer: "DirectoryViewer", *args, **kwarg...
    method do_GET (line 120) | def do_GET(self):
    method send_head (line 130) | def send_head(self):  # pragma: no cover
    method list_directory (line 150) | def list_directory(self, path):  # pragma: no cover
  class ExternalProcessorProcess (line 223) | class ExternalProcessorProcess:
    method __init__ (line 228) | def __init__(self, path: str) -> None:
    method _wait_start (line 242) | def _wait_start(self):
    method stop (line 250) | def stop(self):
  class VizViewerTCPServer (line 259) | class VizViewerTCPServer(socketserver.TCPServer):
    method handle_timeout (line 260) | def handle_timeout(self) -> None:
  class ServerThread (line 265) | class ServerThread(threading.Thread):
    method __init__ (line 266) | def __init__(
    method run (line 292) | def run(self) -> None:
    method view (line 302) | def view(self) -> int:
    method notify_active (line 354) | def notify_active(self) -> None:
    method is_port_in_use (line 357) | def is_port_in_use(self) -> bool:
  class DirectoryViewer (line 364) | class DirectoryViewer:
    method __init__ (line 365) | def __init__(
    method get_link (line 381) | def get_link(self, path: str) -> str:
    method create_server (line 389) | def create_server(self, path: str) -> ServerThread:
    method clean_servers (line 410) | def clean_servers(self, force: bool = False) -> None:
    method run (line 431) | def run(self) -> int:
  function viewer_main (line 454) | def viewer_main() -> int:

FILE: src/viztracer/vizcounter.py
  class VizCounter (line 7) | class VizCounter(_EventBase):
    method _viztracer_log (line 8) | def _viztracer_log(self) -> None:

FILE: src/viztracer/vizevent.py
  class VizEvent (line 11) | class VizEvent:
    method __init__ (line 12) | def __init__(
    method __enter__ (line 21) | def __enter__(self) -> None:
    method __exit__ (line 24) | def __exit__(self, type, value, trace) -> None:

FILE: src/viztracer/vizlogging.py
  class VizLoggingHandler (line 9) | class VizLoggingHandler(Handler):
    method __init__ (line 10) | def __init__(self, *args, **kwargs) -> None:
    method emit (line 14) | def emit(self, record: LogRecord) -> None:
    method setTracer (line 19) | def setTracer(self, tracer: VizTracer) -> None:

FILE: src/viztracer/vizobject.py
  class VizObject (line 8) | class VizObject(_EventBase):
    method __init__ (line 9) | def __init__(self, tracer: VizTracer, name: str, **kwargs) -> None:
    method __del__ (line 17) | def __del__(self) -> None:
    method _viztracer_log (line 23) | def _viztracer_log(self, ph: str = "O") -> None:

FILE: src/viztracer/vizplugin.py
  class VizPluginError (line 16) | class VizPluginError(Exception):
  class VizPluginBase (line 25) | class VizPluginBase:
    method __init__ (line 26) | def __init__(self) -> None:
    method support_version (line 29) | def support_version(self) -> str:
    method message (line 39) | def message(self, m_type: str, payload: dict) -> dict:
  class VizPluginManager (line 57) | class VizPluginManager:
    method __init__ (line 58) | def __init__(
    method _get_plugin_from_string (line 82) | def _get_plugin_from_string(self, plugin: str) -> VizPluginBase:
    method _send_message (line 116) | def _send_message(self, plugin: VizPluginBase, m_type: str, payload: d...
    method has_plugin (line 129) | def has_plugin(self) -> bool:
    method event (line 132) | def event(self, when: str) -> None:
    method command (line 136) | def command(self, cmd: dict) -> None:
    method terminate (line 140) | def terminate(self) -> None:
    method assert_success (line 146) | def assert_success(
    method resolve (line 152) | def resolve(self, version: str, ret: dict) -> None:

FILE: src/viztracer/viztracer.py
  class VizTracer (line 33) | class VizTracer(Tracer):
    method __init__ (line 34) | def __init__(
    method __del__ (line 158) | def __del__(self):
    method get_args (line 169) | def get_args(self) -> list[str]:
    method pid_suffix (line 198) | def pid_suffix(self) -> bool:
    method pid_suffix (line 202) | def pid_suffix(self, pid_suffix: bool) -> None:
    method init_kwargs (line 209) | def init_kwargs(self) -> dict:
    method __enter__ (line 235) | def __enter__(self) -> "VizTracer":
    method __exit__ (line 239) | def __exit__(self, type, value, trace) -> None:
    method connect_report_server (line 245) | def connect_report_server(self) -> None:
    method clean_report_server_process (line 259) | def clean_report_server_process(self) -> None:
    method register_global (line 269) | def register_global(self) -> None:
    method install (line 272) | def install(self) -> None:
    method log_instant (line 289) | def log_instant(
    method log_var (line 299) | def log_var(self, name: str, var: Any, cond: bool = True) -> None:
    method log_event (line 310) | def log_event(self, event_name: str) -> VizEvent:
    method shield_ignore (line 316) | def shield_ignore(self, func: Callable, *args, **kwargs):
    method set_afterfork (line 322) | def set_afterfork(self, callback: Callable, *args, **kwargs) -> None:
    method start (line 327) | def start(self) -> None:
    method stop (line 366) | def stop(self, stop_option: str | None = None) -> None:
    method parse (line 379) | def parse(self) -> int:
    method run (line 409) | def run(self, command: str, output_file: str | None = None) -> None:
    method save_report (line 415) | def save_report(
    method save (line 475) | def save(
    method fork_save (line 571) | def fork_save(self, output_file: str | None = None) -> multiprocessing...
    method terminate (line 588) | def terminate(self) -> None:
    method register_exit (line 591) | def register_exit(self) -> None:
    method exit_routine (line 609) | def exit_routine(self) -> None:
    method enable_thread_tracing (line 617) | def enable_thread_tracing(self) -> None:
    method add_variable (line 621) | def add_variable(self, name: str, var: Any, event: str = "instant") ->...
    method overload_print (line 633) | def overload_print(self) -> None:
    method restore_print (line 646) | def restore_print(self) -> None:
    method add_func_exec (line 649) | def add_func_exec(self, name: str, val: Any, lineno: int) -> None:
    method log_gc (line 661) | def log_gc(self) -> bool:
    method log_gc (line 665) | def log_gc(self, log_gc: bool) -> None:
    method add_garbage_collection (line 675) | def add_garbage_collection(self, phase: str, info: dict[str, Any]) -> ...
  function get_tracer (line 699) | def get_tracer() -> VizTracer | None:

FILE: src/viztracer/web_dist/service_worker.js
  function shouldHandleHttpRequest (line 109) | function shouldHandleHttpRequest(req) {
  function handleHttpRequest (line 123) | async function handleHttpRequest(req) {
  function handleOpenTraceRequest (line 190) | async function handleOpenTraceRequest(req) {
  function installAppVersionIntoCache (line 221) | async function installAppVersionIntoCache(version) {
  function fetchWithTimeout (line 258) | function fetchWithTimeout(req, timeoutMs) {

FILE: src/viztracer/web_dist/v52.0-6b9586def/assets/catapult_trace_viewer.js
  function detectEval (line 16) | function detectEval(){if(typeof chrome!=="undefined"&&chrome.app&&chrome...
  function assert (line 19) | function assert(b){if(!b)throw new Error("Assertion failed");}
  function mixin (line 20) | function mixin(to,from){var names=getOwnPropertyNames(from);for(var i=0;...
  function mixinStatics (line 22) | function mixinStatics(to,from){var names=getOwnPropertyNames(from);for(v...
  function oneOf (line 25) | function oneOf(object,propertyNames){for(var i=0;i<propertyNames.length;...
  function defineNonEnumerableDataProperty (line 26) | function defineNonEnumerableDataProperty(object,name,value){nonEnumerabl...
  function getWrapperConstructor (line 27) | function getWrapperConstructor(node,opt_instance){var nativePrototype=no...
  function addForwardingProperties (line 29) | function addForwardingProperties(nativePrototype,wrapperPrototype){insta...
  function registerInstanceProperties (line 30) | function registerInstanceProperties(wrapperPrototype,instanceObject){ins...
  function isEventHandlerName (line 31) | function isEventHandlerName(name){return/^on[a-z]+$/.test(name);}
  function isIdentifierName (line 32) | function isIdentifierName(name){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(...
  function getGetter (line 33) | function getGetter(name){return hasEval&&isIdentifierName(name)?new Func...
  function getSetter (line 34) | function getSetter(name){return hasEval&&isIdentifierName(name)?new Func...
  function getMethod (line 35) | function getMethod(name){return hasEval&&isIdentifierName(name)?new Func...
  function getDescriptor (line 36) | function getDescriptor(source,name){try{if(source===window&&name==="show...
  function installProperty (line 38) | function installProperty(source,target,allowMethod,opt_blacklist){var na...
  function register (line 43) | function register(nativeConstructor,wrapperConstructor,opt_instance){if(...
  function registerInternal (line 45) | function registerInternal(nativePrototype,wrapperConstructor,opt_instanc...
  function isWrapperFor (line 46) | function isWrapperFor(wrapperConstructor,nativeConstructor){return const...
  function registerObject (line 47) | function registerObject(object){var nativePrototype=Object.getPrototypeO...
  function createWrapperConstructor (line 48) | function createWrapperConstructor(superWrapperConstructor){function Gene...
  function isWrapper (line 50) | function isWrapper(object){return object&&object.__impl4cf1e782hg__;}
  function isNative (line 51) | function isNative(object){return!isWrapper(object);}
  function wrap (line 52) | function wrap(impl){if(impl===null)return null;assert(isNative(impl));va...
  function unwrap (line 54) | function unwrap(wrapper){if(wrapper===null)return null;assert(isWrapper(...
  function unsafeUnwrap (line 55) | function unsafeUnwrap(wrapper){return wrapper.__impl4cf1e782hg__;}
  function setWrapper (line 56) | function setWrapper(impl,wrapper){wrapper.__impl4cf1e782hg__=impl;impl._...
  function unwrapIfNeeded (line 57) | function unwrapIfNeeded(object){return object&&isWrapper(object)?unwrap(...
  function wrapIfNeeded (line 58) | function wrapIfNeeded(object){return object&&!isWrapper(object)?wrap(obj...
  function rewrap (line 59) | function rewrap(node,wrapper){if(wrapper===null)return;assert(isNative(n...
  function defineGetter (line 60) | function defineGetter(constructor,name,getter){getterDescriptor.get=gett...
  function defineWrapGetter (line 61) | function defineWrapGetter(constructor,name){defineGetter(constructor,nam...
  function forwardMethodsToWrapper (line 62) | function forwardMethodsToWrapper(constructors,names){constructors.forEac...
  function newSplice (line 63) | function newSplice(index,removed,addedCount){return{index:index,removed:...
  function ArraySplice (line 64) | function ArraySplice(){}
  function handle (line 74) | function handle(){pending=false;var copies=callbacks.slice(0);callbacks=...
  function setEndOfMicrotask (line 76) | function setEndOfMicrotask(func){callbacks.push(func);if(pending)return;...
  function scheduleCallback (line 77) | function scheduleCallback(observer){if(observer.scheduled_)return;observ...
  function notifyObservers (line 78) | function notifyObservers(){isScheduled=false;while(globalMutationObserve...
  function MutationRecord (line 79) | function MutationRecord(type,target){this.type=type;this.target=target;t...
  function registerTransientObservers (line 80) | function registerTransientObservers(ancestor,node){for(;ancestor;ancesto...
  function removeTransientObserversFor (line 81) | function removeTransientObserversFor(observer){for(var i=0;i<observer.no...
  function enqueueMutation (line 82) | function enqueueMutation(target,type,data){var interestedObservers=Objec...
  function MutationObserverOptions (line 86) | function MutationObserverOptions(options){this.childList=!!options.child...
  function MutationObserver (line 90) | function MutationObserver(callback){this.callback_=callback;this.nodes_=...
  function Registration (line 92) | function Registration(observer,target,options){this.observer=observer;th...
  function TreeScope (line 93) | function TreeScope(root,parent){this.root=root;this.parent=parent;}
  method renderer (line 94) | get renderer(){if(this.root instanceof scope.wrappers.ShadowRoot){return...
  function setTreeScope (line 96) | function setTreeScope(node,treeScope){if(node.treeScope_!==treeScope){no...
  function getTreeScope (line 98) | function getTreeScope(node){if(node instanceof scope.wrappers.Window){de...
  function isShadowRoot (line 100) | function isShadowRoot(node){return node instanceof wrappers.ShadowRoot;}
  function rootOfNode (line 101) | function rootOfNode(node){return getTreeScope(node).root;}
  function getEventPath (line 102) | function getEventPath(node,event){var path=[];var current=node;path.push...
  function eventMustBeStopped (line 107) | function eventMustBeStopped(event){if(!event)return false;switch(event.t...
  function isShadowInsertionPoint (line 109) | function isShadowInsertionPoint(node){return node instanceof HTMLShadowE...
  function getDestinationInsertionPoints (line 110) | function getDestinationInsertionPoints(node){return scope.getDestination...
  function eventRetargetting (line 111) | function eventRetargetting(path,currentTarget){if(path.length===0)return...
  function getTreeScopeAncestors (line 113) | function getTreeScopeAncestors(treeScope){var ancestors=[];for(;treeScop...
  function lowestCommonInclusiveAncestor (line 115) | function lowestCommonInclusiveAncestor(tsA,tsB){var ancestorsA=getTreeSc...
  function getTreeScopeRoot (line 117) | function getTreeScopeRoot(ts){if(!ts.parent)return ts;return getTreeScop...
  function relatedTargetResolution (line 118) | function relatedTargetResolution(event,currentTarget,relatedTarget){if(c...
  function inSameTree (line 120) | function inSameTree(a,b){return getTreeScope(a)===getTreeScope(b);}
  function dispatchOriginalEvent (line 121) | function dispatchOriginalEvent(originalEvent){if(handledEventsTable.get(...
  function isLoadLikeEvent (line 122) | function isLoadLikeEvent(event){switch(event.type){case"load":case"befor...
  function dispatchEvent (line 124) | function dispatchEvent(event,originalWrapperTarget){if(currentlyDispatch...
  function dispatchCapturing (line 128) | function dispatchCapturing(event,eventPath,win,overrideTarget){var phase...
  function dispatchAtTarget (line 131) | function dispatchAtTarget(event,eventPath,win,overrideTarget){var phase=...
  function dispatchBubbling (line 132) | function dispatchBubbling(event,eventPath,win,overrideTarget){var phase=...
  function invoke (line 134) | function invoke(currentTarget,event,phase,eventPath,overrideTarget){var ...
  function Listener (line 142) | function Listener(type,handler,capture){this.type=type;this.handler=hand...
  method removed (line 143) | get removed(){return this.handler===null;}
  function Event (line 143) | function Event(type,options){if(type instanceof OriginalEvent){var impl=...
  method target (line 145) | get target(){return targetTable.get(this);}
  method currentTarget (line 145) | get currentTarget(){return currentTargetTable.get(this);}
  method eventPhase (line 145) | get eventPhase(){return eventPhaseTable.get(this);}
  method path (line 145) | get path(){var eventPath=eventPathTable.get(this);if(!eventPath)return[]...
  function unwrapOptions (line 146) | function unwrapOptions(options){if(!options||!options.relatedTarget)retu...
  function registerGenericEvent (line 147) | function registerGenericEvent(name,SuperEvent,prototype){var OriginalEve...
  method relatedTarget (line 149) | get relatedTarget(){var relatedTarget=relatedTargetTable.get(this);if(re...
  function getInitFunction (line 149) | function getInitFunction(name,relatedTargetIndex){return function(){argu...
  function constructEvent (line 151) | function constructEvent(OriginalEvent,name,type,options){if(supportsEven...
  function BeforeUnloadEvent (line 154) | function BeforeUnloadEvent(impl){Event.call(this,impl);}
  method returnValue (line 155) | get returnValue(){return unsafeUnwrap(this).returnValue;}
  method returnValue (line 155) | set returnValue(v){unsafeUnwrap(this).returnValue=v;}
  function isValidListener (line 155) | function isValidListener(fun){if(typeof fun==="function")return true;ret...
  function isMutationEvent (line 156) | function isMutationEvent(type){switch(type){case"DOMAttrModified":case"D...
  function EventTarget (line 158) | function EventTarget(impl){setWrapper(impl,this);}
  function getTargetToListenAt (line 159) | function getTargetToListenAt(wrapper){if(wrapper instanceof wrappers.Sha...
  function hasListener (line 163) | function hasListener(node,type){var listeners=listenersTable.get(node);i...
  function hasListenerInAncestors (line 165) | function hasListenerInAncestors(target,type){for(var node=unwrap(target)...
  function wrapEventTargetMethods (line 167) | function wrapEventTargetMethods(constructors){forwardMethodsToWrapper(co...
  function elementFromPoint (line 168) | function elementFromPoint(self,document,x,y){scope.renderAllPending();va...
  function getEventHandlerGetter (line 169) | function getEventHandlerGetter(name){return function(){var inlineEventHa...
  function getEventHandlerSetter (line 170) | function getEventHandlerSetter(name){var eventType=name.slice(2);return ...
  function nonEnum (line 173) | function nonEnum(obj,prop){Object.defineProperty(obj,prop,nonEnumDescrip...
  function Touch (line 174) | function Touch(impl){setWrapper(impl,this);}
  method target (line 175) | get target(){return wrap(unsafeUnwrap(this).target);}
  function TouchList (line 175) | function TouchList(){this.length=0;nonEnum(this,"length");}
  function wrapTouchList (line 176) | function wrapTouchList(nativeTouchList){var list=new TouchList();for(var...
  function TouchEvent (line 178) | function TouchEvent(impl){UIEvent.call(this,impl);}
  method touches (line 179) | get touches(){return wrapTouchList(unsafeUnwrap(this).touches);}
  method targetTouches (line 179) | get targetTouches(){return wrapTouchList(unsafeUnwrap(this).targetTouche...
  method changedTouches (line 179) | get changedTouches(){return wrapTouchList(unsafeUnwrap(this).changedTouc...
  function nonEnum (line 179) | function nonEnum(obj,prop){Object.defineProperty(obj,prop,nonEnumDescrip...
  function NodeList (line 180) | function NodeList(){this.length=0;nonEnum(this,"length");}
  function wrapNodeList (line 181) | function wrapNodeList(list){if(list==null)return list;var wrapperList=ne...
  function addWrapNodeListMethod (line 183) | function addWrapNodeListMethod(wrapperConstructor,name){wrapperConstruct...
  function assertIsNodeWrapper (line 184) | function assertIsNodeWrapper(node){assert(node instanceof Node);}
  function createOneElementNodeList (line 185) | function createOneElementNodeList(node){var nodes=new NodeList();nodes[0...
  function enqueueRemovalForInsertedNodes (line 186) | function enqueueRemovalForInsertedNodes(node,parent,nodes){enqueueMutati...
  function enqueueRemovalForInsertedDocumentFragment (line 187) | function enqueueRemovalForInsertedDocumentFragment(df,nodes){enqueueMuta...
  function collectNodes (line 188) | function collectNodes(node,parentNode,previousNode,nextNode){if(node ins...
  function collectNodesNative (line 193) | function collectNodesNative(node){if(node instanceof DocumentFragment)re...
  function collectNodesForDocumentFragment (line 194) | function collectNodesForDocumentFragment(node){var nodes=new NodeList();...
  function snapshotNodeList (line 196) | function snapshotNodeList(nodeList){return nodeList;}
  function nodeWasAdded (line 197) | function nodeWasAdded(node,treeScope){setTreeScope(node,treeScope);node....
  function nodesWereAdded (line 198) | function nodesWereAdded(nodes,parent){var treeScope=getTreeScope(parent)...
  function nodeWasRemoved (line 199) | function nodeWasRemoved(node){setTreeScope(node,new TreeScope(node,null));}
  function nodesWereRemoved (line 200) | function nodesWereRemoved(nodes){for(var i=0;i<nodes.length;i++){nodeWas...
  function ensureSameOwnerDocument (line 201) | function ensureSameOwnerDocument(parent,child){var ownerDoc=parent.nodeT...
  function adoptNodesIfNeeded (line 202) | function adoptNodesIfNeeded(owner,nodes){if(!nodes.length)return;var own...
  function unwrapNodesForInsertion (line 203) | function unwrapNodesForInsertion(owner,nodes){adoptNodesIfNeeded(owner,n...
  function clearChildNodes (line 205) | function clearChildNodes(wrapper){if(wrapper.firstChild_!==undefined){va...
  function removeAllChildNodes (line 207) | function removeAllChildNodes(wrapper){if(wrapper.invalidateShadowRendere...
  function invalidateParent (line 209) | function invalidateParent(node){var p=node.parentNode;return p&&p.invali...
  function cleanupNodes (line 210) | function cleanupNodes(nodes){for(var i=0,n;i<nodes.length;i++){n=nodes[i...
  function cloneNode (line 211) | function cloneNode(node,deep,opt_doc){var clone;if(opt_doc)clone=wrap(or...
  function contains (line 214) | function contains(self,child){if(!child||getTreeScope(self)!==getTreeSco...
  function Node (line 216) | function Node(original){assert(original instanceof OriginalNode);EventTa...
  method parentNode (line 229) | get parentNode(){return this.parentNode_!==undefined?this.parentNode_:wr...
  method firstChild (line 229) | get firstChild(){return this.firstChild_!==undefined?this.firstChild_:wr...
  method lastChild (line 229) | get lastChild(){return this.lastChild_!==undefined?this.lastChild_:wrap(...
  method nextSibling (line 229) | get nextSibling(){return this.nextSibling_!==undefined?this.nextSibling_...
  method previousSibling (line 229) | get previousSibling(){return this.previousSibling_!==undefined?this.prev...
  method parentElement (line 229) | get parentElement(){var p=this.parentNode;while(p&&p.nodeType!==Node.ELE...
  method textContent (line 230) | get textContent(){var s="";for(var child=this.firstChild;child;child=chi...
  method textContent (line 231) | set textContent(textContent){if(textContent==null)textContent="";var rem...
  method childNodes (line 232) | get childNodes(){var wrapperList=new NodeList();var i=0;for(var child=th...
  function filterNodeList (line 235) | function filterNodeList(list,index,result,deep){var wrappedItem=null;var...
  function shimSelector (line 238) | function shimSelector(selector){return String(selector).replace(/\/deep\...
  function shimMatchesSelector (line 239) | function shimMatchesSelector(selector){return String(selector).replace(/...
  function findOne (line 240) | function findOne(node,selector){var m,el=node.firstElementChild;while(el...
  function matchesSelector (line 242) | function matchesSelector(el,selector){return el.matches(selector);}
  function matchesTagName (line 243) | function matchesTagName(el,localName,localNameLowerCase){var ln=el.local...
  function matchesEveryThing (line 244) | function matchesEveryThing(){return true;}
  function matchesLocalNameOnly (line 245) | function matchesLocalNameOnly(el,ns,localName){return el.localName===loc...
  function matchesNameSpace (line 246) | function matchesNameSpace(el,ns){return el.namespaceURI===ns;}
  function matchesLocalNameNS (line 247) | function matchesLocalNameNS(el,ns,localName){return el.namespaceURI===ns...
  function findElements (line 248) | function findElements(node,index,result,p,arg0,arg1){var el=node.firstEl...
  function querySelectorAllFiltered (line 250) | function querySelectorAllFiltered(p,index,result,selector,deep){var targ...
  function getElementsByTagNameFiltered (line 254) | function getElementsByTagNameFiltered(p,index,result,localName,lowercase...
  function getElementsByTagNameNSFiltered (line 256) | function getElementsByTagNameNSFiltered(p,index,result,ns,localName){var...
  function forwardElement (line 259) | function forwardElement(node){while(node&&node.nodeType!==Node.ELEMENT_N...
  function backwardsElement (line 261) | function backwardsElement(node){while(node&&node.nodeType!==Node.ELEMENT...
  method firstElementChild (line 263) | get firstElementChild(){return forwardElement(this.firstChild);}
  method lastElementChild (line 263) | get lastElementChild(){return backwardsElement(this.lastChild);}
  method childElementCount (line 263) | get childElementCount(){var count=0;for(var child=this.firstElementChild...
  method children (line 264) | get children(){var wrapperList=new NodeList();var i=0;for(var child=this...
  method nextElementSibling (line 265) | get nextElementSibling(){return forwardElement(this.nextSibling);}
  method previousElementSibling (line 265) | get previousElementSibling(){return backwardsElement(this.previousSiblin...
  function CharacterData (line 265) | function CharacterData(node){Node.call(this,node);}
  method nodeValue (line 266) | get nodeValue(){return this.data;}
  method nodeValue (line 266) | set nodeValue(data){this.data=data;}
  method textContent (line 266) | get textContent(){return this.data;}
  method textContent (line 266) | set textContent(value){this.data=value;}
  method data (line 266) | get data(){return unsafeUnwrap(this).data;}
  method data (line 266) | set data(value){var oldValue=unsafeUnwrap(this).data;enqueueMutation(thi...
  function toUInt32 (line 266) | function toUInt32(x){return x>>>0;}
  function Text (line 267) | function Text(node){CharacterData.call(this,node);}
  function getClass (line 269) | function getClass(el){return unsafeUnwrap(el).getAttribute("class");}
  function enqueueClassAttributeChange (line 270) | function enqueueClassAttributeChange(el,oldValue){enqueueMutation(el,"at...
  function invalidateClass (line 271) | function invalidateClass(el){scope.invalidateRendererBasedOnAttribute(el...
  function changeClass (line 272) | function changeClass(tokenList,method,args){var ownerElement=tokenList.o...
  function invalidateRendererBasedOnAttribute (line 275) | function invalidateRendererBasedOnAttribute(element,name){var p=element....
  function enqueAttributeChange (line 276) | function enqueAttributeChange(element,name,oldValue){enqueueMutation(ele...
  function Element (line 277) | function Element(node){Node.call(this,node);}
  method shadowRoot (line 278) | get shadowRoot(){return unsafeUnwrap(this).polymerShadowRoot_||null;}
  method classList (line 278) | get classList(){var list=classListTable.get(this);if(!list){list=unsafeU...
  method className (line 279) | get className(){return unsafeUnwrap(this).className;}
  method className (line 279) | set className(v){this.setAttribute("class",v);}
  method id (line 279) | get id(){return unsafeUnwrap(this).id;}
  method id (line 279) | set id(v){this.setAttribute("id",v);}
  function escapeReplace (line 280) | function escapeReplace(c){switch(c){case"&":return"&amp;";case"<":return...
  function escapeAttr (line 281) | function escapeAttr(s){return s.replace(escapeAttrRegExp,escapeReplace);}
  function escapeData (line 282) | function escapeData(s){return s.replace(escapeDataRegExp,escapeReplace);}
  function makeSet (line 283) | function makeSet(arr){var set={};for(var i=0;i<arr.length;i++){set[arr[i...
  function needsSelfClosingSlash (line 285) | function needsSelfClosingSlash(node){if(node.namespaceURI!==XHTML_NS)ret...
  function getOuterHTML (line 286) | function getOuterHTML(node,parentNode){switch(node.nodeType){case Node.E...
  function getInnerHTML (line 289) | function getInnerHTML(node){if(node instanceof wrappers.HTMLTemplateElem...
  function setInnerHTML (line 291) | function setInnerHTML(node,value,opt_tagName){var tagName=opt_tagName||"...
  function HTMLElement (line 292) | function HTMLElement(node){Element.call(this,node);}
  method innerHTML (line 293) | get innerHTML(){return getInnerHTML(this);}
  method innerHTML (line 293) | set innerHTML(value){if(oldIe&&plaintextParents[this.localName]){this.te...
  method outerHTML (line 295) | get outerHTML(){return getOuterHTML(this,this.parentNode);}
  method outerHTML (line 295) | set outerHTML(value){var p=this.parentNode;if(p){p.invalidateShadowRende...
  method hidden (line 296) | get hidden(){return this.hasAttribute("hidden");}
  method hidden (line 296) | set hidden(v){if(v){this.setAttribute("hidden","");}else{this.removeAttr...
  function frag (line 296) | function frag(contextElement,html){var p=unwrap(contextElement.cloneNode...
  function getter (line 298) | function getter(name){return function(){scope.renderAllPending();return ...
  function getterRequiresRendering (line 299) | function getterRequiresRendering(name){defineGetter(HTMLElement,name,get...
  function getterAndSetterRequiresRendering (line 300) | function getterAndSetterRequiresRendering(name){Object.defineProperty(HT...
  function methodRequiresRendering (line 301) | function methodRequiresRendering(name){Object.defineProperty(HTMLElement...
  function HTMLCanvasElement (line 302) | function HTMLCanvasElement(node){HTMLElement.call(this,node);}
  function HTMLContentElement (line 303) | function HTMLContentElement(node){HTMLElement.call(this,node);}
  method select (line 304) | get select(){return this.getAttribute("select");}
  method select (line 304) | set select(value){this.setAttribute("select",value);}
  function HTMLFormElement (line 304) | function HTMLFormElement(node){HTMLElement.call(this,node);}
  method elements (line 305) | get elements(){return wrapHTMLCollection(unwrap(this).elements);}
  function HTMLImageElement (line 305) | function HTMLImageElement(node){HTMLElement.call(this,node);}
  function Image (line 306) | function Image(width,height){if(!(this instanceof Image)){throw new Type...
  function HTMLShadowElement (line 308) | function HTMLShadowElement(node){HTMLElement.call(this,node);}
  function getTemplateContentsOwner (line 309) | function getTemplateContentsOwner(doc){if(!doc.defaultView)return doc;va...
  function extractContent (line 312) | function extractContent(templateElement){var doc=getTemplateContentsOwne...
  function HTMLTemplateElement (line 314) | function HTMLTemplateElement(node){HTMLElement.call(this,node);if(!Origi...
  method content (line 315) | get content(){if(OriginalHTMLTemplateElement)return wrap(unsafeUnwrap(th...
  function HTMLMediaElement (line 315) | function HTMLMediaElement(node){HTMLElement.call(this,node);}
  function HTMLAudioElement (line 316) | function HTMLAudioElement(node){HTMLMediaElement.call(this,node);}
  function Audio (line 317) | function Audio(src){if(!(this instanceof Audio)){throw new TypeError("DO...
  function trimText (line 319) | function trimText(s){return s.replace(/\s+/g," ").trim();}
  function HTMLOptionElement (line 320) | function HTMLOptionElement(node){HTMLElement.call(this,node);}
  method text (line 321) | get text(){return trimText(this.textContent);}
  method text (line 321) | set text(value){this.textContent=trimText(String(value));}
  method form (line 321) | get form(){return wrap(unwrap(this).form);}
  function Option (line 321) | function Option(text,value,defaultSelected,selected){if(!(this instanceo...
  function HTMLSelectElement (line 323) | function HTMLSelectElement(node){HTMLElement.call(this,node);}
  method form (line 325) | get form(){return wrap(unwrap(this).form);}
  function HTMLTableElement (line 325) | function HTMLTableElement(node){HTMLElement.call(this,node);}
  method caption (line 326) | get caption(){return wrap(unwrap(this).caption);}
  method tHead (line 326) | get tHead(){return wrap(unwrap(this).tHead);}
  method tFoot (line 326) | get tFoot(){return wrap(unwrap(this).tFoot);}
  method tBodies (line 326) | get tBodies(){return wrapHTMLCollection(unwrap(this).tBodies);}
  method rows (line 326) | get rows(){return wrapHTMLCollection(unwrap(this).rows);}
  function HTMLTableSectionElement (line 326) | function HTMLTableSectionElement(node){HTMLElement.call(this,node);}
  method rows (line 327) | get rows(){return wrapHTMLCollection(unwrap(this).rows);}
  function HTMLTableRowElement (line 327) | function HTMLTableRowElement(node){HTMLElement.call(this,node);}
  method cells (line 328) | get cells(){return wrapHTMLCollection(unwrap(this).cells);}
  function HTMLUnknownElement (line 328) | function HTMLUnknownElement(node){switch(node.localName){case"content":r...
  function SVGElement (line 331) | function SVGElement(node){Element.call(this,node);}
  method ownerSVGElement (line 332) | get ownerSVGElement(){return wrap(unsafeUnwrap(this).ownerSVGElement);}
  function SVGUseElement (line 332) | function SVGUseElement(impl){parentInterface.call(this,impl);}
  method instanceRoot (line 333) | get instanceRoot(){return wrap(unwrap(this).instanceRoot);}
  method animatedInstanceRoot (line 333) | get animatedInstanceRoot(){return wrap(unwrap(this).animatedInstanceRoot);}
  function SVGElementInstance (line 334) | function SVGElementInstance(impl){EventTarget.call(this,impl);}
  method correspondingElement (line 335) | get correspondingElement(){return wrap(unsafeUnwrap(this).correspondingE...
  method correspondingUseElement (line 335) | get correspondingUseElement(){return wrap(unsafeUnwrap(this).correspondi...
  method parentNode (line 335) | get parentNode(){return wrap(unsafeUnwrap(this).parentNode);}
  method childNodes (line 335) | get childNodes(){throw new Error("Not implemented");}
  method firstChild (line 335) | get firstChild(){return wrap(unsafeUnwrap(this).firstChild);}
  method lastChild (line 335) | get lastChild(){return wrap(unsafeUnwrap(this).lastChild);}
  method previousSibling (line 335) | get previousSibling(){return wrap(unsafeUnwrap(this).previousSibling);}
  method nextSibling (line 335) | get nextSibling(){return wrap(unsafeUnwrap(this).nextSibling);}
  function CanvasRenderingContext2D (line 335) | function CanvasRenderingContext2D(impl){setWrapper(impl,this);}
  method canvas (line 336) | get canvas(){return wrap(unsafeUnwrap(this).canvas);}
  function WebGLRenderingContext (line 336) | function WebGLRenderingContext(impl){setWrapper(impl,this);}
  method canvas (line 337) | get canvas(){return wrap(unsafeUnwrap(this).canvas);}
  function DocumentFragment (line 338) | function DocumentFragment(node){Node.call(this,node);}
  function ShadowRoot (line 339) | function ShadowRoot(hostWrapper){var node=unwrap(unsafeUnwrap(hostWrappe...
  method innerHTML (line 340) | get innerHTML(){return getInnerHTML(this);}
  method innerHTML (line 340) | set innerHTML(value){setInnerHTML(this,value);this.invalidateShadowRende...
  method olderShadowRoot (line 340) | get olderShadowRoot(){return nextOlderShadowTreeTable.get(this)||null;}
  method host (line 340) | get host(){return shadowHostTable.get(this)||null;}
  method activeElement (line 340) | get activeElement(){var unwrappedActiveElement=unwrap(this).ownerDocumen...
  function getHost (line 342) | function getHost(node){var root=getTreeScope(node).root;if(root instance...
  function hostNodeToShadowNode (line 344) | function hostNodeToShadowNode(refNode,offset){if(refNode.shadowRoot){off...
  function shadowNodeToHostNode (line 346) | function shadowNodeToHostNode(node){node=wrap(node);return getHost(node)...
  function Range (line 347) | function Range(impl){setWrapper(impl,this);}
  method startContainer (line 348) | get startContainer(){return shadowNodeToHostNode(unsafeUnwrap(this).star...
  method endContainer (line 348) | get endContainer(){return shadowNodeToHostNode(unsafeUnwrap(this).endCon...
  method commonAncestorContainer (line 348) | get commonAncestorContainer(){return shadowNodeToHostNode(unsafeUnwrap(t...
  function updateWrapperUpAndSideways (line 349) | function updateWrapperUpAndSideways(wrapper){wrapper.previousSibling_=wr...
  function updateWrapperDown (line 350) | function updateWrapperDown(wrapper){wrapper.firstChild_=wrapper.firstChi...
  function updateAllChildNodes (line 351) | function updateAllChildNodes(parentNodeWrapper){assert(parentNodeWrapper...
  function insertBefore (line 353) | function insertBefore(parentNodeWrapper,newChildWrapper,refChildWrapper)...
  function remove (line 355) | function remove(nodeWrapper){var node=unwrap(nodeWrapper);var parentNode...
  function resetDistributedNodes (line 356) | function resetDistributedNodes(insertionPoint){distributedNodesTable.set...
  function getDistributedNodes (line 357) | function getDistributedNodes(insertionPoint){var rv=distributedNodesTabl...
  function getChildNodesSnapshot (line 358) | function getChildNodesSnapshot(node){var result=[],i=0;for(var child=nod...
  function renderAllPending (line 360) | function renderAllPending(){for(var i=0;i<pendingDirtyRenderers.length;i...
  function handleRequestAnimationFrame (line 362) | function handleRequestAnimationFrame(){renderTimer=null;renderAllPending...
  function getRendererForHost (line 363) | function getRendererForHost(host){var renderer=rendererForHostTable.get(...
  function getShadowRootAncestor (line 365) | function getShadowRootAncestor(node){var root=getTreeScope(node).root;if...
  function getRendererForShadowRoot (line 366) | function getRendererForShadowRoot(shadowRoot){return getRendererForHost(...
  function RenderNode (line 367) | function RenderNode(node){this.skip=false;this.node=node;this.childNodes...
  function ShadowRenderer (line 372) | function ShadowRenderer(host){this.host=host;this.dirty=false;this.inval...
  method parentRenderer (line 373) | get parentRenderer(){return getTreeScope(this.host).renderer;}
  function poolPopulation (line 383) | function poolPopulation(node){var pool=[];for(var child=node.firstChild;...
  function getShadowInsertionPoint (line 385) | function getShadowInsertionPoint(node){if(node instanceof HTMLShadowElem...
  function destributeNodeInto (line 387) | function destributeNodeInto(child,insertionPoint){getDistributedNodes(in...
  function getDestinationInsertionPoints (line 388) | function getDestinationInsertionPoints(node){return destinationInsertion...
  function resetDestinationInsertionPoints (line 389) | function resetDestinationInsertionPoints(node){destinationInsertionPoint...
  function matches (line 390) | function matches(node,contentElement){var select=contentElement.getAttri...
  function isFinalDestination (line 391) | function isFinalDestination(insertionPoint,node){var points=getDestinati...
  function isInsertionPoint (line 392) | function isInsertionPoint(node){return node instanceof HTMLContentElemen...
  function isShadowHost (line 393) | function isShadowHost(shadowHost){return shadowHost.shadowRoot;}
  function getShadowTrees (line 394) | function getShadowTrees(host){var trees=[];for(var tree=host.shadowRoot;...
  function render (line 396) | function render(host){new ShadowRenderer(host).render();}
  function createWrapperConstructor (line 398) | function createWrapperConstructor(name){if(!window[name])return;assert(!...
  function Selection (line 399) | function Selection(impl){setWrapper(impl,this);}
  method anchorNode (line 400) | get anchorNode(){return wrap(unsafeUnwrap(this).anchorNode);}
  method focusNode (line 400) | get focusNode(){return wrap(unsafeUnwrap(this).focusNode);}
  function TreeWalker (line 401) | function TreeWalker(impl){setWrapper(impl,this);}
  method root (line 402) | get root(){return wrap(unsafeUnwrap(this).root);}
  method currentNode (line 402) | get currentNode(){return wrap(unsafeUnwrap(this).currentNode);}
  method currentNode (line 402) | set currentNode(node){unsafeUnwrap(this).currentNode=unwrapIfNeeded(node);}
  method filter (line 402) | get filter(){return unsafeUnwrap(this).filter;}
  function Document (line 402) | function Document(node){Node.call(this,node);this.treeScope_=new TreeSco...
  function wrapMethod (line 405) | function wrapMethod(name){var original=document[name];Document.prototype...
  function adoptNodeNoRemove (line 406) | function adoptNodeNoRemove(node,doc){originalAdoptNode.call(unsafeUnwrap...
  function adoptSubtree (line 407) | function adoptSubtree(node,doc){if(node.shadowRoot)doc.adoptNode(node.sh...
  function adoptOlderShadowRoots (line 408) | function adoptOlderShadowRoots(shadowRoot,doc){var oldShadowRoot=shadowR...
  function CustomElementConstructor (line 416) | function CustomElementConstructor(node){if(!node){if(extendsOption){retu...
  method implementation (line 419) | get implementation(){var implementation=implementationTable.get(this);if...
  method defaultView (line 419) | get defaultView(){return wrap(unwrap(this).defaultView);}
  function DOMImplementation (line 419) | function DOMImplementation(impl){setWrapper(impl,this);}
  function wrapImplMethod (line 420) | function wrapImplMethod(constructor,name){var original=document.implemen...
  function forwardImplMethod (line 421) | function forwardImplMethod(constructor,name){var original=document.imple...
  function Window (line 422) | function Window(impl){EventTarget.call(this,impl);}
  method document (line 424) | get document(){return wrap(unwrap(this).document);}
  function FormData (line 425) | function FormData(formElement){var impl;if(formElement instanceof Origin...
  function overrideConstructor (line 427) | function overrideConstructor(tagName){var nativeConstructorName=elements...
  function stylesToCssText (line 446) | function stylesToCssText(styles,preserveComments){var cssText="";Array.p...
  function cssTextToStyle (line 448) | function cssTextToStyle(cssText){var style=document.createElement("style...
  function cssToRules (line 449) | function cssToRules(cssText){var style=cssTextToStyle(cssText);document....
  function initFrame (line 451) | function initFrame(){frame.initialized=true;document.body.appendChild(fr...
  function inFrame (line 452) | function inFrame(fn){if(!frame.initialized){initFrame();}
  function withCssRules (line 454) | function withCssRules(cssText,callback){if(!callback){return;}
  function rulesToCss (line 456) | function rulesToCss(cssRules){for(var i=0,css=[];i<cssRules.length;i++){...
  function addCssToDocument (line 458) | function addCssToDocument(cssText){if(cssText){getSheet().appendChild(do...
  function addOwnSheet (line 459) | function addOwnSheet(cssText,name){var style=cssTextToStyle(cssText);sty...
  function getSheet (line 460) | function getSheet(){if(!sheet){sheet=document.createElement("style");she...
  function isRelativeScheme (line 469) | function isRelativeScheme(scheme){return relative[scheme]!==undefined;}
  function invalid (line 470) | function invalid(){clear.call(this);this._isInvalid=true;}
  function IDNAToASCII (line 471) | function IDNAToASCII(h){if(""==h){invalid.call(this);}
  function percentEscape (line 473) | function percentEscape(c){var unicode=c.charCodeAt(0);if(unicode>32&&uni...
  function percentEscapeQuery (line 475) | function percentEscapeQuery(c){var unicode=c.charCodeAt(0);if(unicode>32...
  function parse (line 477) | function parse(input,stateOverride,base){function err(message){errors.pu...
  function clear (line 517) | function clear(){this._scheme="";this._schemeData="";this._username="";t...
  function jURL (line 518) | function jURL(url,base){if(base!==undefined&&!(base instanceof jURL))bas...
  method href (line 519) | get href(){if(this._isInvalid)return this._url;var authority="";if(""!=t...
  method href (line 520) | set href(href){clear.call(this);parse.call(this,href);}
  method protocol (line 520) | get protocol(){return this._scheme+":";}
  method protocol (line 520) | set protocol(protocol){if(this._isInvalid)return;parse.call(this,protoco...
  method host (line 520) | get host(){return this._isInvalid?"":this._port?this._host+":"+this._por...
  method host (line 520) | set host(host){if(this._isInvalid||!this._isRelative)return;parse.call(t...
  method hostname (line 520) | get hostname(){return this._host;}
  method hostname (line 520) | set hostname(hostname){if(this._isInvalid||!this._isRelative)return;pars...
  method port (line 520) | get port(){return this._port;}
  method port (line 520) | set port(port){if(this._isInvalid||!this._isRelative)return;parse.call(t...
  method pathname (line 520) | get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path...
  method pathname (line 520) | set pathname(pathname){if(this._isInvalid||!this._isRelative)return;this...
  method search (line 520) | get search(){return this._isInvalid||!this._query||"?"==this._query?"":t...
  method search (line 520) | set search(search){if(this._isInvalid||!this._isRelative)return;this._qu...
  method hash (line 520) | get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?...
  method hash (line 520) | set hash(hash){if(this._isInvalid)return;this._fragment="#";if("#"==hash...
  method origin (line 520) | get origin(){var host;if(this._isInvalid||!this._scheme){return"";}
  function scheduleCallback (line 526) | function scheduleCallback(observer){scheduledObservers.push(observer);if...
  function wrapIfNeeded (line 527) | function wrapIfNeeded(node){return window.ShadowDOMPolyfill&&window.Shad...
  function dispatchCallbacks (line 528) | function dispatchCallbacks(){isScheduled=false;var observers=scheduledOb...
  function removeTransientObserversFor (line 529) | function removeTransientObserversFor(observer){observer.nodes_.forEach(f...
  function forEachAncestorAndObserverEnqueueRecord (line 530) | function forEachAncestorAndObserverEnqueueRecord(target,callback){for(va...
  function JsMutationObserver (line 531) | function JsMutationObserver(callback){this.callback_=callback;this.nodes...
  function MutationRecord (line 535) | function MutationRecord(type,target){this.type=type;this.target=target;t...
  function copyMutationRecord (line 536) | function copyMutationRecord(original){var record=new MutationRecord(orig...
  function getRecord (line 537) | function getRecord(type,target){return currentRecord=new MutationRecord(...
  function getRecordWithOldValue (line 538) | function getRecordWithOldValue(oldValue){if(recordWithOldValue)return re...
  function clearRecords (line 539) | function clearRecords(){currentRecord=recordWithOldValue=undefined;}
  function recordRepresentsCurrentMutation (line 540) | function recordRepresentsCurrentMutation(record){return record===recordW...
  function selectRecord (line 541) | function selectRecord(lastRecord,newRecord){if(lastRecord===newRecord)re...
  function Registration (line 542) | function Registration(observer,target,options){this.observer=observer;th...
  function whenReady (line 553) | function whenReady(callback,doc){doc=doc||rootDocument;whenDocumentReady...
  function isDocumentReady (line 554) | function isDocumentReady(doc){return doc.readyState==="complete"||doc.re...
  function whenDocumentReady (line 555) | function whenDocumentReady(callback,doc){if(!isDocumentReady(doc)){var c...
  function markTargetLoaded (line 556) | function markTargetLoaded(event){event.target.__loaded=true;}
  function watchImportsLoad (line 557) | function watchImportsLoad(callback,doc){var imports=doc.querySelectorAll...
  function isImportLoaded (line 561) | function isImportLoaded(link){return useNative?link.__loaded||link.impor...
  function handleImports (line 562) | function handleImports(nodes){for(var i=0,l=nodes.length,n;i<l&&(n=nodes...
  function isImport (line 563) | function isImport(element){return element.localName==="link"&&element.re...
  function handleImport (line 564) | function handleImport(element){var loaded=element.import;if(loaded){mark...
  function nodeIsImport (line 587) | function nodeIsImport(elt){return elt.localName==="link"&&elt.rel===IMPO...
  function generateScriptDataUrl (line 588) | function generateScriptDataUrl(script){var scriptContent=generateScriptC...
  function generateScriptContent (line 589) | function generateScriptContent(script){return script.textContent+generat...
  function generateSourceMapHint (line 590) | function generateSourceMapHint(script){var owner=script.ownerDocument;ow...
  function cloneStyle (line 591) | function cloneStyle(style){var clone=style.ownerDocument.createElement("...
  function isImportLink (line 595) | function isImportLink(elt){return isLinkRel(elt,IMPORT_LINK_TYPE);}
  function isLinkRel (line 596) | function isLinkRel(elt,rel){return elt.localName==="link"&&elt.getAttrib...
  function hasBaseURIAccessor (line 597) | function hasBaseURIAccessor(doc){return!!Object.getOwnPropertyDescriptor...
  function makeDocument (line 598) | function makeDocument(resource,url){var doc=document.implementation.crea...
  function bootstrap (line 605) | function bootstrap(){window.HTMLImports.importer.bootDocument(rootDocume...
  function forSubtree (line 606) | function forSubtree(node,cb){findAllElements(node,function(e){if(cb(e)){...
  function findAllElements (line 608) | function findAllElements(node,find,data){var e=node.firstElementChild;if...
  function forRoots (line 612) | function forRoots(node,cb){var root=node.shadowRoot;while(root){forSubtr...
  function forDocumentTree (line 613) | function forDocumentTree(doc,cb){_forDocumentTree(doc,cb,[]);}
  function _forDocumentTree (line 614) | function _forDocumentTree(doc,cb,processingDocuments){doc=window.wrap(do...
  function addedNode (line 617) | function addedNode(node,isAttached){return added(node,isAttached)||added...
  function added (line 618) | function added(node,isAttached){if(scope.upgrade(node,isAttached)){retur...
  function addedSubtree (line 620) | function addedSubtree(node,isAttached){forSubtree(node,function(e){if(ad...
  function deferMutation (line 621) | function deferMutation(fn){pendingMutations.push(fn);if(!isPendingMutati...
  function takeMutations (line 622) | function takeMutations(){isPendingMutations=false;var $p=pendingMutation...
  function attached (line 624) | function attached(element){if(hasThrottledAttached){deferMutation(functi...
  function _attached (line 625) | function _attached(element){if(element.__upgraded__&&!element.__attached...
  function detachedNode (line 626) | function detachedNode(node){detached(node);forSubtree(node,function(e){d...
  function detached (line 627) | function detached(element){if(hasThrottledAttached){deferMutation(functi...
  function _detached (line 628) | function _detached(element){if(element.__upgraded__&&element.__attached)...
  function inDocument (line 629) | function inDocument(element){var p=element;var doc=window.wrap(document)...
  function watchShadow (line 631) | function watchShadow(node){if(node.shadowRoot&&!node.shadowRoot.__watche...
  function handler (line 632) | function handler(root,mutations){if(flags.dom){var mx=mutations[0];if(mx...
  function takeRecords (line 638) | function takeRecords(node){node=window.wrap(node);if(!node){node=window....
  function observe (line 641) | function observe(inRoot){if(inRoot.__observer){return;}
  function upgradeDocument (line 643) | function upgradeDocument(doc){doc=window.wrap(doc);flags.dom&&console.gr...
  function upgradeDocumentTree (line 644) | function upgradeDocumentTree(doc){forDocumentTree(doc,upgradeDocument);}
  function upgrade (line 646) | function upgrade(node,isAttached){if(node.localName==="template"){if(win...
  function upgradeWithDefinition (line 648) | function upgradeWithDefinition(element,definition,isAttached){flags.upgr...
  function implementPrototype (line 651) | function implementPrototype(element,definition){if(Object.__proto__){ele...
  function customMixin (line 652) | function customMixin(inTarget,inSrc,inNative){var used={};var p=inSrc;wh...
  function created (line 654) | function created(element){if(element.createdCallback){element.createdCal...
  function register (line 655) | function register(name,options){var definition=options||{};if(!name){thr...
  function overrideAttributeApi (line 663) | function overrideAttributeApi(prototype){if(prototype.setAttribute._poly...
  function changeAttribute (line 665) | function changeAttribute(name,value,operation){name=name.toLowerCase();v...
  function isReservedTag (line 666) | function isReservedTag(name){for(var i=0;i<reservedTagList.length;i++){i...
  function ancestry (line 667) | function ancestry(extnds){var extendee=getRegisteredDefinition(extnds);i...
  function resolveTagName (line 669) | function resolveTagName(definition){var baseTag=definition.extends;for(v...
  function resolvePrototypeChain (line 671) | function resolvePrototypeChain(definition){if(!Object.__proto__){var nat...
  function instantiate (line 677) | function instantiate(definition){return upgradeWithDefinition(domCreateE...
  function getRegisteredDefinition (line 678) | function getRegisteredDefinition(name){if(name){return registry[name.toL...
  function registerDefinition (line 679) | function registerDefinition(name,definition){registry[name]=definition;}
  function generateConstructor (line 680) | function generateConstructor(definition){return function(){return instan...
  function createElementNS (line 681) | function createElementNS(namespace,tag,typeExtension){if(namespace===HTM...
  function createElement (line 682) | function createElement(tag,typeExtension){if(tag){tag=tag.toLowerCase();}
  function wrapDomMethodToForceUpgrade (line 693) | function wrapDomMethodToForceUpgrade(obj,methodName){var orig=obj[method...
  function bootstrap (line 697) | function bootstrap(){upgradeDocumentTree(window.wrap(document));window.C...
  function resolve (line 701) | function resolve(){document.body.removeAttribute('unresolved');}
  function forceDomModulesUpgrade (line 734) | function forceDomModulesUpgrade(){if(cePolyfill){var script=document._cu...
  function resolveCss (line 754) | function resolveCss(cssText,ownerDocument){return cssText.replace(CSS_UR...
  function resolveAttrs (line 755) | function resolveAttrs(element,ownerDocument){for(var name in URL_ATTRS){...
  function resolve (line 756) | function resolve(url,ownerDocument){if(url&&ABS_URL.test(url)){return url;}
  function resolveUrl (line 758) | function resolveUrl(url,baseUri){if(!tempDoc){tempDoc=document.implement...
  function getUrlResolver (line 760) | function getUrlResolver(ownerDocument){return ownerDocument.body.__urlRe...
  function pathFromUrl (line 761) | function pathFromUrl(url){return url.substring(0,url.lastIndexOf('/')+1);}
  function newSplice (line 770) | function newSplice(index,removed,addedCount){return{index:index,removed:...
  function ArraySplice (line 771) | function ArraySplice(){}
  function escapeReplace (line 796) | function escapeReplace(c){switch(c){case'&':return'&amp;';case'<':return...
  function escapeAttr (line 797) | function escapeAttr(s){return s.replace(escapeAttrRegExp,escapeReplace);}
  function escapeData (line 798) | function escapeData(s){return s.replace(escapeDataRegExp,escapeReplace);}
  function makeSet (line 799) | function makeSet(arr){var set={};for(var i=0;i<arr.length;i++){set[arr[i...
  function getOuterHTML (line 801) | function getOuterHTML(node,parentNode,composed){switch(node.nodeType){ca...
  function getInnerHTML (line 805) | function getInnerHTML(node,composed){if(node instanceof HTMLTemplateElem...
  method rootTarget (line 869) | get rootTarget(){return this.event.path[0];}
  method localTarget (line 869) | get localTarget(){return this.event.target;}
  method path (line 869) | get path(){var path=this.event.path;if(!Array.isArray(path)){path=Array....
  method rootTarget (line 870) | get rootTarget(){return this.event.target;}
  method localTarget (line 870) | get localTarget(){var current=this.event.currentTarget;var currentRoot=c...
  method path (line 870) | get path(){if(!this.event._path){var path=[];var current=this.rootTarget...
  function distributeNodeInto (line 904) | function distributeNodeInto(child,insertionPoint){insertionPoint._distri...
  function clearDistributedDestinationInsertionPoints (line 905) | function clearDistributedDestinationInsertionPoints(content){var e$=cont...
  function maybeRedistributeParent (line 906) | function maybeRedistributeParent(content,host){var parent=TreeApi.Logica...
  function isFinalDestination (line 907) | function isFinalDestination(insertionPoint,node){var points=node._destin...
  function isInsertionPoint (line 908) | function isInsertionPoint(node){return node.localName=='content';}
  function getTopDistributingHost (line 909) | function getTopDistributingHost(host){while(host&&hostNeedsRedistributio...
  function hostNeedsRedistribution (line 911) | function hostNeedsRedistribution(host){var c$=TreeApi.Logical.getChildNo...
  function notifyContentObservers (line 912) | function notifyContentObservers(root){for(var i=0,c;i<root._insertionPoi...
  function notifyInitialDistribution (line 913) | function notifyInitialDistribution(host){if(DomApi.hasApi(host)){Polymer...
  function upgradeLogicalChildren (line 914) | function upgradeLogicalChildren(children){if(needsUpgrade&&children){for...
  function debounce (line 916) | function debounce(debouncer,callback,wait){if(debouncer){debouncer.stop(...
  function isMouseEvent (line 956) | function isMouseEvent(name){return MOUSE_EVENTS.indexOf(name)>-1;}
  function PASSIVE_TOUCH (line 957) | function PASSIVE_TOUCH(eventName){if(isMouseEvent(eventName)||eventName=...
  function setupTeardownMouseCanceller (line 961) | function setupTeardownMouseCanceller(setup){var events=IS_TOUCH_ONLY?['c...
  function ignoreMouse (line 962) | function ignoreMouse(ev){if(!POINTERSTATE.mouse.mouseIgnoreJob){setupTea...
  function hasLeftMouseButton (line 964) | function hasLeftMouseButton(ev){var type=ev.type;if(!isMouseEvent(type))...
  function isSyntheticClick (line 967) | function isSyntheticClick(ev){if(ev.type==='click'){if(ev.detail===0){re...
  function firstTouchAction (line 970) | function firstTouchAction(ev){var path=Polymer.dom(ev).path;var ta='auto...
  function trackDocument (line 972) | function trackDocument(stateObj,movefn,upfn){stateObj.movefn=movefn;stat...
  function untrackDocument (line 973) | function untrackDocument(stateObj){document.removeEventListener('mousemo...
  function mapSet (line 1125) | function mapSet(name,props){name=name.trim();mixinMap[name]={properties:...
  function mapGet (line 1126) | function mapGet(name){name=name.trim();return mixinMap[name];}
  function replaceInitialOrInherit (line 1127) | function replaceInitialOrInherit(property,value){var match=INITIAL_INHER...
  function cssTextToMap (line 1129) | function cssTextToMap(text){var props=text.split(';');var property,value...
  function invalidateMixinEntry (line 1131) | function invalidateMixinEntry(mixinEntry){var currentProto=ApplyShim.__c...
  function produceCssProperties (line 1132) | function produceCssProperties(matchText,propertyName,valueProperty,value...
  function fixVars (line 1142) | function fixVars(matchText,varA,varB){return'var('+varA+','+'var('+varB+...
  function atApplyToCssProperties (line 1143) | function atApplyToCssProperties(mixinName,fallbacks){mixinName=mixinName...
  function consumeCssProperties (line 1148) | function consumeCssProperties(text){var m;while(m=MIXIN_MATCH.exec(text)...
  function addToBitMask (line 1195) | function addToBitMask(n,bits){var o=parseInt(n/32);var v=1<<n%32;bits[o]...
  method _styleProperties (line 1197) | get _styleProperties(){if(!this._properties){styleProperties.decorateSty...
  function exportPath (line 1293) | function exportPath(name){const parts=name.split('.');let cur=global;for...
  function isExported (line 1295) | function isExported(name){const parts=name.split('.');let cur=global;for...
  function isDefined (line 1297) | function isDefined(name){const parts=name.split('.');let curObject=globa...
  function showPanicElementIfNeeded (line 1299) | function showPanicElementIfNeeded(){if(panicElement)return;const panicOv...
  function showPanic (line 1300) | function showPanic(panicTitle,panicDetails){if(tr.isHeadless){if(panicDe...
  function hasPanic (line 1303) | function hasPanic(){return rawPanicMessages.length!==0;}
  function getPanicText (line 1304) | function getPanicText(){return rawPanicMessages.map(function(msg){return...
  function exportTo (line 1305) | function exportTo(namespace,fn){const obj=exportPath(namespace);const ex...
  function initialize (line 1306) | function initialize(){if(global.isVinn){tr.isVinn=true;}else if(global.p...
  function Base64 (line 1308) | function Base64(){}
  function b64ToUint6 (line 1309) | function b64ToUint6(nChr){if(nChr>64&&nChr<91)return nChr-65;if(nChr>96&...
  method allocateSimple (line 1315) | allocateSimple(){return nextGUID++;}
  method getLastSimpleGuid (line 1315) | getLastSimpleGuid(){return nextGUID-1;}
  method allocateUUID4 (line 1315) | allocateUUID4(){return UUID4_PATTERN.replace(/[xy]/g,function(c){let r=p...
  function deepCopy (line 1315) | function deepCopy(value){if(!(value instanceof Object)){if(value===undef...
  function normalizeException (line 1321) | function normalizeException(e){if(e===undefined||e===null){return{typeNa...
  function stackTraceAsString (line 1325) | function stackTraceAsString(){return new Error().stack+'';}
  function stackTrace (line 1326) | function stackTrace(){let stack=stackTraceAsString();stack=stack.split('...
  function getUsingPath (line 1327) | function getUsingPath(path,fromDict){const parts=path.split('.');let cur...
  function formatDate (line 1329) | function formatDate(date){return date.toISOString().replace('T',' ').sli...
  function numberToJson (line 1330) | function numberToJson(n){if(isNaN(n))return'NaN';if(n===Infinity)return'...
  function numberFromJson (line 1331) | function numberFromJson(n){if(n==='NaN'||n===null)return NaN;if(n==='Inf...
  function runLengthEncoding (line 1332) | function runLengthEncoding(ary){const encodedArray=[];for(const element ...
  function isUrl (line 1334) | function isUrl(s){return typeof(s)==='string'&&s.match(URL_REGEX)!==null;}
  function getOnlyElement (line 1335) | function getOnlyElement(iterable){const iterator=iterable[Symbol.iterato...
  function getFirstElement (line 1338) | function getFirstElement(iterable){const iterator=iterable[Symbol.iterat...
  function compareArrays (line 1340) | function compareArrays(x,y,elementCmp){const minLength=Math.min(x.length...
  function groupIntoMap (line 1342) | function groupIntoMap(ary,callback,opt_this,opt_arrayConstructor){const ...
  function inPlaceFilter (line 1345) | function inPlaceFilter(array,predicate,opt_this){opt_this=opt_this||this...
  function invertArrayOfDicts (line 1348) | function invertArrayOfDicts(array,opt_dictGetter,opt_this){opt_this=opt_...
  function setsEqual (line 1351) | function setsEqual(a,b){if(!(a instanceof Set)||!(b instanceof Set))retu...
  function findLowIndexInSortedArray (line 1353) | function findLowIndexInSortedArray(ary,mapFn,loVal){if(ary.length===0)re...
  function findIndexInSortedIntervals (line 1355) | function findIndexInSortedIntervals(ary,mapLoFn,mapWidthFn,loVal){const ...
  function findIndexInSortedClosedIntervals (line 1365) | function findIndexInSortedClosedIntervals(ary,mapLoFn,mapHiFn,val){const...
  function iterateOverIntersectingIntervals (line 1373) | function iterateOverIntersectingIntervals(ary,mapLoFn,mapWidthFn,loVal,h...
  function findClosestElementInSortedArray (line 1377) | function findClosestElementInSortedArray(ary,mapFn,val,maxDiff){if(ary.l...
  function findClosestIntervalInSortedIntervals (line 1378) | function findClosestIntervalInSortedIntervals(ary,mapLoFn,mapHiFn,val,ma...
  function findFirstTrueIndexInSortedArray (line 1380) | function findFirstTrueIndexInSortedArray(array,test){let i0=0;let i1=arr...
  class Mark (line 1382) | class Mark{constructor(groupName,functionName,opt_timestamp){if(tr.isHea...
    method constructor (line 1382) | constructor(groupName,functionName,opt_timestamp){if(tr.isHeadless)ret...
    method groupName (line 1384) | get groupName(){return this.groupName_;}
    method functionName (line 1385) | get functionName(){return this.functionName_;}
    method measureName (line 1386) | get measureName(){return this.measureName_;}
    method startMark (line 1387) | get startMark(){return this.startMark_||tr.b.getOnlyElement(window.per...
    method endMark (line 1388) | get endMark(){return this.endMark_||tr.b.getOnlyElement(window.perform...
    method durationMs (line 1389) | get durationMs(){return this.endMark.startTime-this.startMark.startTime;}
    method end (line 1390) | end(opt_timestamp){if(tr.isHeadless)return;if(opt_timestamp){this.endM...
  class Timing (line 1393) | class Timing{static mark(groupName,functionName,opt_timestamp){return ne...
    method mark (line 1393) | static mark(groupName,functionName,opt_timestamp){return new Mark(grou...
    method instant (line 1394) | static instant(groupName,functionName,opt_value){const valueString=opt...
    method getCurrentTimeMs (line 1396) | static getCurrentTimeMs(){try{return performance.now();}catch(error){}
  function EventTarget (line 1398) | function EventTarget(){}
  method addEventListener (line 1399) | addEventListener(type,handler){if(!this.listeners_){this.listeners_=Obje...
  method removeEventListener (line 1400) | removeEventListener(type,handler){if(!this.listeners_)return;if(type in ...
  method dispatchEvent (line 1400) | dispatchEvent(event){if(!this.listeners_)return true;event.__defineGette...
  method dispatchAsync (line 1401) | async dispatchAsync(event){if(!this.listeners_)return true;const listene...
  method hasEventListener (line 1402) | hasEventListener(type){return(this.listeners_!==undefined&&this.listener...
  function RegisteredTypeInfo (line 1402) | function RegisteredTypeInfo(constructor,metadata){this.constructor=const...
  function ExtensionRegistryOptions (line 1403) | function ExtensionRegistryOptions(mode){if(mode===undefined){throw new E...
  method freeze (line 1406) | freeze(){if(this.frozen_){throw new Error('Frozen');}
  method mode (line 1407) | get mode(){return this.mode_;}
  method defaultMetadata (line 1407) | get defaultMetadata(){return this.defaultMetadata_;}
  method defaultMetadata (line 1407) | set defaultMetadata(defaultMetadata){if(this.frozen_){throw new Error('F...
  method defaultConstructor (line 1408) | get defaultConstructor(){return this.defaultConstructor_;}
  method defaultConstructor (line 1408) | set defaultConstructor(defaultConstructor){if(this.frozen_){throw new Er...
  method defaultTypeInfo (line 1409) | get defaultTypeInfo(){if(this.defaultTypeInfo_===undefined&&this.default...
  method validateConstructor (line 1410) | validateConstructor(constructor){if(!this.mandatoryBaseClass)return;let ...
  function HeadlessEvent (line 1412) | function HeadlessEvent(type,opt_bubbles,opt_preventable){this.type=type;...
  method preventDefault (line 1413) | preventDefault(){this.defaultPrevented=true;}
  method stopPropagation (line 1413) | stopPropagation(){this.cancelBubble=true;}
  function TrEvent (line 1413) | function TrEvent(type,opt_bubbles,opt_preventable){const e=tr.doc.create...
  function dispatchSimpleEvent (line 1415) | function dispatchSimpleEvent(target,type,opt_bubbles,opt_cancelable,opt_...
  function dispatchSimpleEventAsync (line 1416) | async function dispatchSimpleEventAsync(target,type,opt_fields){const e=...
  function decorateBasicExtensionRegistry (line 1417) | function decorateBasicExtensionRegistry(registry,extensionRegistryOption...
  function getCategoryParts (line 1426) | function getCategoryParts(category){let parts=categoryPartsFor[category]...
  function decorateTypeBasedExtensionRegistry (line 1427) | function decorateTypeBasedExtensionRegistry(registry,extensionRegistryOp...
  function decorateExtensionRegistry (line 1435) | function decorateExtensionRegistry(registry,registryOptions){if(registry...
  function Importer (line 1438) | function Importer(){}
  method importerName (line 1439) | get importerName(){return'Importer';}
  method isTraceDataContainer (line 1439) | isTraceDataContainer(){return false;}
  method extractSubtraces (line 1439) | extractSubtraces(){return[];}
  method importClockSyncMarkers (line 1439) | importClockSyncMarkers(){}
  method importEvents (line 1439) | importEvents(){}
  method importSampleData (line 1439) | importSampleData(){}
  method finalizeImport (line 1439) | finalizeImport(){}
  function EmptyImporter (line 1440) | function EmptyImporter(events){this.importPriority=0;}
  method importerName (line 1443) | get importerName(){return'EmptyImporter';}
  function convertEventsToRanges (line 1443) | function convertEventsToRanges(events){return events.map(function(event)...
  function mergeRanges (line 1444) | function mergeRanges(inRanges,mergeThreshold,mergeFunction){const remain...
  function findEmptyRangesBetweenRanges (line 1451) | function findEmptyRangesBetweenRanges(inRanges,opt_totalRange){if(opt_to...
  function Auditor (line 1456) | function Auditor(model){this.model_=model;}
  method model (line 1457) | get model(){return this.model_;}
  method runAnnotate (line 1457) | runAnnotate(){}
  method installUserFriendlyCategoryDriverIfNeeded (line 1457) | installUserFriendlyCategoryDriverIfNeeded(){}
  method runAudit (line 1457) | runAudit(){}
  function defineUnitPrefixScale (line 1457) | function defineUnitPrefixScale(name,prefixes){if(UnitPrefixScale[name]!=...
  function definePrefixScaleFromUnitScale (line 1462) | function definePrefixScaleFromUnitScale(prefixName,unitScale){if(!unitSc...
  function convertUnit (line 1472) | function convertUnit(value,fromScale,toScale){if(value===undefined)retur...
  method roundedLess (line 1474) | roundedLess(a,b){return Math.round(a*1000)<Math.round(b*1000);}
  method roundedLess (line 1474) | roundedLess(a,b){return Math.round(a*1000000)<Math.round(b*1000000);}
  function iterateElementDeeplyImpl (line 1474) | function iterateElementDeeplyImpl(element,cb,thisArg,includeElement){if(...
  function iterateElementDeeply (line 1477) | function iterateElementDeeply(element,cb,thisArg){iterateElementDeeplyIm...
  function findDeepElementMatchingPredicate (line 1478) | function findDeepElementMatchingPredicate(element,predicate){let foundEl...
  function findDeepElementsMatchingPredicate (line 1481) | function findDeepElementsMatchingPredicate(element,predicate){const foun...
  function findDeepElementMatching (line 1484) | function findDeepElementMatching(element,selector){return findDeepElemen...
  function findDeepElementsMatching (line 1485) | function findDeepElementsMatching(element,selector){return findDeepEleme...
  function findDeepElementWithTextContent (line 1486) | function findDeepElementWithTextContent(element,re){return findDeepEleme...
  function getNumberFormatter (line 1487) | function getNumberFormatter(minSpec,maxSpec,minCtx,maxCtx){const key=min...
  function max (line 1490) | function max(a,b){if(a===undefined)return b;if(b===undefined)return a;re...
  function Unit (line 1491) | function Unit(unitName,jsonName,scaleBaseUnit,isDelta,improvementDirecti...
  method asJSON (line 1492) | asJSON(){return this.jsonName;}
  method asJSON2 (line 1492) | asJSON2(){return this.asJSON().replace('_smallerIsBetter','-').replace('...
  method truncate (line 1492) | truncate(value){if(typeof value!=='number')return value;if(0===(value%1)...
  method getUnitScale_ (line 1494) | getUnitScale_(opt_context){let formatSpec=this.formatSpec_;let formatSpe...
  method unitString (line 1497) | get unitString(){const scale=this.getUnitScale_();if(!scale){throw new E...
  method format (line 1498) | format(value,opt_context){let signString='';if(value<0){signString='-';v...
  method get (line 1502) | get(){return Unit.currentTimeDisplayMode_;}
  method set (line 1502) | set(value){if(Unit.currentTimeDisplayMode_===value)return;Unit.currentTi...
  method formatSpec (line 1508) | formatSpec(){return Unit.currentTimeDisplayMode_.formatSpec;}
  method formatSpec (line 1508) | formatSpec(){return Unit.currentTimeDisplayMode_.formatSpec;}
  function n (line 1508) | function n(a){if(r[a])return r[a].exports;var e=r[a]={exports:{},id:a,lo...
  function approximately (line 1508) | function approximately(x,y,delta){if(delta===undefined)delta=1e-9;return...
  function clamp (line 1509) | function clamp(x,lo,hi){return Math.min(Math.max(x,lo),hi);}
  function lerp (line 1510) | function lerp(percentage,lo,hi){const range=hi-lo;return lo+percentage*r...
  function normalize (line 1511) | function normalize(value,lo,hi){return(value-lo)/(hi-lo);}
  function deg2rad (line 1512) | function deg2rad(deg){return(Math.PI*deg)/180.0;}
  function erf (line 1513) | function erf(x){const sign=(x>=0)?1:-1;x=Math.abs(x);const a1=0.25482959...
  function logOrLog10 (line 1515) | function logOrLog10(x,base){if(base===10)return Math.log10(x);return Mat...
  function lesserPower (line 1516) | function lesserPower(x,opt_base){const base=opt_base||10;return Math.pow...
  function greaterPower (line 1517) | function greaterPower(x,opt_base){const base=opt_base||10;return Math.po...
  function lesserWholeNumber (line 1518) | function lesserWholeNumber(x){if(x===0)return 0;const pow10=(x<0)?-lesse...
  function greaterWholeNumber (line 1519) | function greaterWholeNumber(x){if(x===0)return 0;const pow10=(x<0)?-less...
  function truncate (line 1520) | function truncate(value,digits){const pow10=Math.pow(10,digits);return M...
  function preferredNumberLargerThanMin (line 1521) | function preferredNumberLargerThanMin(min){const absMin=Math.abs(min);co...
  function Range (line 1524) | function Range(){this.isEmpty_=true;this.min_=undefined;this.max_=undefi...
  method clone (line 1525) | clone(){if(this.isEmpty)return new Range();return Range.fromExplicitRang...
  method reset (line 1525) | reset(){this.isEmpty_=true;this.min_=undefined;this.max_=undefined;}
  method isEmpty (line 1525) | get isEmpty(){return this.isEmpty_;}
  method addRange (line 1525) | addRange(range){if(range.isEmpty)return;this.addValue(range.min);this.ad...
  method addValue (line 1525) | addValue(value){if(this.isEmpty_){this.max_=value;this.min_=value;this.i...
  method min (line 1526) | set min(min){this.isEmpty_=false;this.min_=min;}
  method min (line 1526) | get min(){if(this.isEmpty_)return undefined;return this.min_;}
  method max (line 1526) | get max(){if(this.isEmpty_)return undefined;return this.max_;}
  method max (line 1526) | set max(max){this.isEmpty_=false;this.max_=max;}
  method range (line 1526) | get range(){if(this.isEmpty_)return undefined;return this.max_-this.min_;}
  method center (line 1526) | get center(){return(this.min_+this.max_)*0.5;}
  method duration (line 1526) | get duration(){if(this.isEmpty_)return 0;return this.max_-this.min_;}
  method enclosingPowers (line 1526) | enclosingPowers(opt_base){if(this.isEmpty)return new Range();return Rang...
  method normalize (line 1526) | normalize(x){return tr.b.math.normalize(x,this.min,this.max);}
  method lerp (line 1526) | lerp(x){return tr.b.math.lerp(x,this.min,this.max);}
  method clamp (line 1526) | clamp(x){return tr.b.math.clamp(x,this.min,this.max);}
  method equals (line 1526) | equals(that){if(this.isEmpty&&that.isEmpty)return true;if(this.isEmpty!=...
  method containsExplicitRangeInclusive (line 1526) | containsExplicitRangeInclusive(min,max){if(this.isEmpty)return false;ret...
  method containsExplicitRangeExclusive (line 1526) | containsExplicitRangeExclusive(min,max){if(this.isEmpty)return false;ret...
  method intersectsExplicitRangeInclusive (line 1526) | intersectsExplicitRangeInclusive(min,max){if(this.isEmpty)return false;r...
  method intersectsExplicitRangeExclusive (line 1526) | intersectsExplicitRangeExclusive(min,max){if(this.isEmpty)return false;r...
  method containsRangeInclusive (line 1526) | containsRangeInclusive(range){if(range.isEmpty)return false;return this....
  method containsRangeExclusive (line 1526) | containsRangeExclusive(range){if(range.isEmpty)return false;return this....
  method intersectsRangeInclusive (line 1526) | intersectsRangeInclusive(range){if(range.isEmpty)return false;return thi...
  method intersectsRangeExclusive (line 1526) | intersectsRangeExclusive(range){if(range.isEmpty)return false;return thi...
  method findExplicitIntersectionDuration (line 1526) | findExplicitIntersectionDuration(min,max){min=Math.max(this.min,min);max...
  method findIntersection (line 1526) | findIntersection(range){if(this.isEmpty||range.isEmpty)return new Range(...
  method toJSON (line 1526) | toJSON(){if(this.isEmpty_)return{isEmpty:true};return{isEmpty:false,max:...
  method filterArray (line 1526) | filterArray(sortedArray,opt_keyFunc,opt_this){if(this.isEmpty_)return[];...
  function EventRegistry (line 1533) | function EventRegistry(){}
  function convertCamelCaseToTitleCase (line 1538) | function convertCamelCaseToTitleCase(name){let result=name.replace(/[A-Z...
  function EventSet (line 1539) | function EventSet(opt_events){this.bounds_=new tr.b.math.Range();this.ev...
  method bounds (line 1540) | get bounds(){return this.bounds_;}
  method duration (line 1540) | get duration(){if(this.bounds_.isEmpty)return 0;return this.bounds_.max-...
  method length (line 1540) | get length(){return this.events_.size;}
  method guid (line 1540) | get guid(){return this.guid_;}
  method [Symbol.iterator] (line 1540) | *[Symbol.iterator](){for(const event of this.events_){yield event;}}
  method clear (line 1540) | clear(){this.bounds_=new tr.b.math.Range();this.events_.clear();}
  method push (line 1540) | push(...events){let numPushed;for(const event of events){if(event.guid==...
  method contains (line 1543) | contains(event){if(this.events_.has(event))return event;return undefined;}
  method addEventSet (line 1543) | addEventSet(eventSet){for(const event of eventSet){this.push(event);}}
  method intersectionIsEmpty (line 1543) | intersectionIsEmpty(otherEventSet){return!this.some(event=>otherEventSet...
  method equals (line 1543) | equals(that){if(this.length!==that.length)return false;return this.every...
  method sortEvents (line 1543) | sortEvents(compare){const ary=this.toArray();ary.sort(compare);this.clea...
  method getEventsOrganizedByBaseType (line 1543) | getEventsOrganizedByBaseType(opt_pruneEmpty){const allTypeInfos=EventReg...
  method getEventsOrganizedByTitle (line 1545) | getEventsOrganizedByTitle(){return this.getEventsOrganizedByCallback(fun...
  method getEventsOrganizedByCallback (line 1546) | getEventsOrganizedByCallback(cb,opt_this){const groupedEvents=tr.b.group...
  method enumEventsOfType (line 1547) | enumEventsOfType(type,func){for(const event of this){if(event instanceof...
  method userFriendlyName (line 1547) | get userFriendlyName(){if(this.length===0){throw new Error('Empty event ...
  method filter (line 1550) | filter(fn,opt_this){const res=new EventSet();for(const event of this){if...
  method toArray (line 1551) | toArray(){const ary=[];for(const event of this){ary.push(event);}
  method forEach (line 1552) | forEach(fn,opt_this){for(const event of this){fn.call(opt_this,event);}}
  method map (line 1552) | map(fn,opt_this){const res=[];for(const event of this){res.push(fn.call(...
  method every (line 1553) | every(fn,opt_this){for(const event of this){if(!fn.call(opt_this,event))...
  method some (line 1554) | some(fn,opt_this){for(const event of this){if(fn.call(opt_this,event)){r...
  method asDict (line 1555) | asDict(){const stableIds=[];for(const event of this){stableIds.push(even...
  method asSet (line 1556) | asSet(){return this.events_;}
  function clamp01 (line 1556) | function clamp01(value){return Math.max(0,Math.min(1,value));}
  function Color (line 1557) | function Color(opt_r,opt_g,opt_b,opt_a){this.r=Math.floor(opt_r)||0;this...
  function hue2rgb (line 1564) | function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*...
  method clone (line 1566) | clone(){const c=new Color();c.r=this.r;c.g=this.g;c.b=this.b;c.a=this.a;...
  method blendOver (line 1566) | blendOver(bgColor){const oneMinusThisAlpha=1-this.a;const outA=this.a+bg...
  method brighten (line 1566) | brighten(opt_k){const k=opt_k||0.45;return new Color(Math.min(255,this.r...
  method lighten (line 1566) | lighten(k,opt_maxL){const maxL=opt_maxL!==undefined?opt_maxL:1.0;const h...
  method darken (line 1566) | darken(opt_k){let k;if(opt_k!==undefined){k=opt_k;}else{k=0.45;}
  method desaturate (line 1567) | desaturate(opt_desaturateFactor){let desaturateFactor;if(opt_desaturateF...
  method withAlpha (line 1568) | withAlpha(a){return new Color(this.r,this.g,this.b,a);}
  method toString (line 1568) | toString(){if(this.a!==undefined){return'rgba('+
  method toHSL (line 1571) | toHSL(){const r=this.r/255;const g=this.g/255;const b=this.b/255;const m...
  method toStringWithAlphaOverride (line 1574) | toStringWithAlphaOverride(alpha){return'rgba('+
  function SinebowColorGenerator (line 1576) | function SinebowColorGenerator(opt_a,opt_brightness){this.a_=(opt_a===un...
  method colorForKey (line 1577) | colorForKey(key){if(!this.keyToColor[key]){this.keyToColor[key]=this.nex...
  method nextColor (line 1578) | nextColor(){const components=SinebowColorGenerator.nthColor(this.colorIn...
  function ColorScheme (line 1580) | function ColorScheme(){}
  function pushVariant (line 1581) | function pushVariant(func){const variantColors=paletteBase.map(func);Col...
  function SelectableItem (line 1586) | function SelectableItem(modelItem){this.modelItem_=modelItem;}
  method modelItem (line 1587) | get modelItem(){return this.modelItem_;}
  method selected (line 1587) | get selected(){return this.selectionState===SelectionState.SELECTED;}
  method addToSelection (line 1587) | addToSelection(selection){const modelItem=this.modelItem_;if(!modelItem)...
  method addToTrackMap (line 1587) | addToTrackMap(eventToTrackMap,track){const modelItem=this.modelItem_;if(...
  function Event (line 1587) | function Event(){SelectableItem.call(this,this);this.guid_=tr.b.GUID.all...
  method guid (line 1588) | get guid(){return this.guid_;}
  method stableId (line 1588) | get stableId(){return undefined;}
  method range (line 1588) | get range(){const range=new tr.b.math.Range();this.addBoundsToRange(rang...
  method addAssociatedAlert (line 1588) | addAssociatedAlert(alert){if(this.associatedAlerts===IMMUTABLE_EMPTY_SET...
  method addBoundsToRange (line 1589) | addBoundsToRange(range){}
  function TimedEvent (line 1589) | function TimedEvent(start){tr.model.Event.call(this);this.start=start;th...
  method end (line 1590) | get end(){return this.start+this.duration;}
  method boundsRange (line 1590) | get boundsRange(){return tr.b.math.Range.fromExplicitRange(this.start,th...
  method addBoundsToRange (line 1590) | addBoundsToRange(range){range.addValue(this.start);range.addValue(this.e...
  method bounds (line 1590) | bounds(that,opt_precisionUnit){if(opt_precisionUnit===undefined){opt_pre...
  function AsyncSlice (line 1591) | function AsyncSlice(category,title,colorId,start,args,duration,opt_isTop...
  method analysisTypeName (line 1594) | get analysisTypeName(){return this.title;}
  method parentContainer (line 1594) | get parentContainer(){return this.parentContainer_;}
  method parentContainer (line 1594) | set parentContainer(parentContainer){this.parentContainer_=parentContain...
  method viewSubGroupTitle (line 1594) | get viewSubGroupTitle(){return this.title;}
  method viewSubGroupGroupingKey (line 1594) | get viewSubGroupGroupingKey(){return undefined;}
  method userFriendlyName (line 1594) | get userFriendlyName(){return'Async slice '+this.title+' at '+
  method stableId (line 1595) | get stableId(){const parentAsyncSliceGroup=this.parentContainer.asyncSli...
  method findTopmostSlicesRelativeToThisSlice (line 1596) | *findTopmostSlicesRelativeToThisSlice(eventPredicate,opt_this){if(eventP...
  method findDescendentSlice (line 1597) | findDescendentSlice(targetTitle){if(!this.subSlices)return undefined;for...
  method enumerateAllDescendents (line 1599) | *enumerateAllDescendents(){for(const slice of this.subSlices){yield slice;}
  method compareTo (line 1600) | compareTo(that){return this.title.localeCompare(that.title);}
  function getSlicesIntersectingRange (line 1600) | function getSlicesIntersectingRange(rangeOfInterest,slices){const slices...
  function ChromeProcessHelper (line 1602) | function ChromeProcessHelper(modelHelper,process){this.modelHelper=model...
  method pid (line 1603) | get pid(){return this.process.pid;}
  method isTelemetryInternalEvent (line 1603) | isTelemetryInternalEvent(slice){if(this.telemetryInternalRanges_===undef...
  method findTelemetryInternalRanges_ (line 1605) | findTelemetryInternalRanges_(){this.telemetryInternalRanges_=[];let star...
  method getFrameEventsInRange (line 1605) | getFrameEventsInRange(frametimeType,range){const titleToGet=(frametimeTy...
  function getFrametimeDataFromEvents (line 1606) | function getFrametimeDataFromEvents(frameEvents){const frametimeData=[];...
  function ChromeBrowserHelper (line 1608) | function ChromeBrowserHelper(modelHelper,process){tr.model.helpers.Chrom...
  method browserName (line 1609) | get browserName(){const hasInProcessRendererThread=this.process.findAllT...
  method mainThread (line 1609) | get mainThread(){return this.mainThread_;}
  method rendererHelpers (line 1609) | get rendererHelpers(){return this.modelHelper.rendererHelpers;}
  method getLoadingEventsInRange (line 1609) | getLoadingEventsInRange(rangeOfInterest){return this.getAllAsyncSlicesMa...
  method getCommitProvisionalLoadEventsInRange (line 1609) | getCommitProvisionalLoadEventsInRange(rangeOfInterest){return this.getAl...
  method hasLatencyEvents (line 1609) | get hasLatencyEvents(){let hasLatency=false;for(const thread of this.mod...
  method getLatencyEventsInRange (line 1611) | getLatencyEventsInRange(rangeOfInterest){return this.getAllAsyncSlicesMa...
  method getAllAsyncSlicesMatching (line 1611) | getAllAsyncSlicesMatching(pred,opt_this){const events=[];this.iterAllThr...
  method iterAllThreads (line 1611) | iterAllThreads(func,opt_this){for(const thread of Object.values(this.pro...
  function ChromeGpuHelper (line 1612) | function ChromeGpuHelper(modelHelper,process){tr.model.helpers.ChromePro...
  class ChromeThreadHelper (line 1614) | class ChromeThreadHelper{constructor(thread){this.thread=thread;}
    method constructor (line 1614) | constructor(thread){this.thread=thread;}
    method getNetworkEvents (line 1615) | getNetworkEvents(){const networkEvents=[];for(const slice of this.thre...
  function ChromeRendererHelper (line 1617) | function ChromeRendererHelper(modelHelper,process){tr.model.helpers.Chro...
  method mainThread (line 1618) | get mainThread(){return this.mainThread_;}
  method compositorThread (line 1618) | get compositorThread(){return this.compositorThread_;}
  method rasterWorkerThreads (line 1618) | get rasterWorkerThreads(){return this.rasterWorkerThreads_;}
  method dedicatedWorkerThreads (line 1618) | get dedicatedWorkerThreads(){return this.dedicatedWorkerThreads_;}
  method foregroundWorkerThreads (line 1618) | get foregroundWorkerThreads(){return this.foregroundWorkerThreads_;}
  method isChromeTracingUI (line 1618) | get isChromeTracingUI(){return ChromeRendererHelper.isTracingProcess(thi...
  class Segment (line 1618) | class Segment extends tr.model.TimedEvent{constructor(start,duration){su...
    method constructor (line 1618) | constructor(start,duration){super(start);this.duration=duration;this.e...
    method expectations (line 1619) | get expectations(){return this.expectations_;}
    method clone (line 1620) | clone(){const clone=new Segment(this.start,this.duration);clone.expect...
    method addSegment (line 1621) | addSegment(other){this.duration+=other.duration;this.expectations.push...
  class TelemetryHelper (line 1622) | class TelemetryHelper{constructor(modelHelper){this.modelHelper=modelHel...
    method constructor (line 1622) | constructor(modelHelper){this.modelHelper=modelHelper;this.renderersWi...
    method renderersWithIR (line 1623) | get renderersWithIR(){this.findIRs_();return this.renderersWithIR_;}
    method irSegments (line 1624) | get irSegments(){this.findIRs_();return this.irSegments_;}
    method uiSegments (line 1625) | get uiSegments(){this.findIRs_();return this.uiSegments_;}
    method animationSegments (line 1626) | get animationSegments(){if(this.animationSegments_===undefined){const ...
    method findIRs_ (line 1628) | findIRs_(){if(this.irSegments_!==undefined)return;this.renderersWithIR...
  function findChromeBrowserProcesses (line 1633) | function findChromeBrowserProcesses(model){return model.getAllProcesses(...
  function findChromeRenderProcesses (line 1634) | function findChromeRenderProcesses(model){return model.getAllProcesses(t...
  function findChromeGpuProcess (line 1635) | function findChromeGpuProcess(model){const gpuProcesses=model.getAllProc...
  function findTelemetrySurfaceFlingerProcess (line 1636) | function findTelemetrySurfaceFlingerProcess(model){const surfaceFlingerP...
  function ChromeModelHelper (line 1637) | function ChromeModelHelper(model){this.model_=model;const browserProcess...
  method pid (line 1639) | get pid(){throw new Error('woah');}
  method process (line 1639) | get process(){throw new Error('woah');}
  method model (line 1639) | get model(){return this.model_;}
  method browserProcess (line 1639) | get browserProcess(){if(this.browserHelper===undefined)return undefined;...
  method browserHelper (line 1639) | get browserHelper(){return this.browserHelpers_[0];}
  method browserHelpers (line 1639) | get browserHelpers(){return this.browserHelpers_;}
  method gpuHelper (line 1639) | get gpuHelper(){return this.gpuHelper_;}
  method rendererHelpers (line 1639) | get rendererHelpers(){return this.rendererHelpers_;}
  method surfaceFlingerProcess (line 1639) | get surfaceFlingerProcess(){return this.surfaceFlingerProcess_;}
  method chromeBounds (line 1639) | get chromeBounds(){if(!this.chromeBounds_){this.chromeBounds_=new tr.b.m...
  method telemetryHelper (line 1643) | get telemetryHelper(){return this.telemetryHelper_;}
  function InputLatencyAsyncSlice (line 1643) | function InputLatencyAsyncSlice(){AsyncSlice.apply(this,arguments);this....
  method isLegacyEvent (line 1644) | get isLegacyEvent(){return this.title==='InputLatency';}
  method typeName (line 1644) | get typeName(){if(!this.typeName_){this.determineLegacyTypeName_();}
  method checkTypeName_ (line 1645) | checkTypeName_(){if(!this.typeName_){throw new Error('Unable to determin...
  method determineModernTypeName_ (line 1647) | determineModernTypeName_(){const lastColonIndex=this.title.lastIndexOf('...
  method determineLegacyTypeName_ (line 1647) | determineLegacyTypeName_(){for(const subSlice of this.enumerateAllDescen...
  method getRendererHelper (line 1650) | getRendererHelper(sourceSlices){const traceModel=this.startThread.parent...
  method addEntireSliceHierarchy (line 1653) | addEntireSliceHierarchy(slice){this.associatedEvents_.push(slice);slice....
  method addDirectlyAssociatedEvents (line 1653) | addDirectlyAssociatedEvents(flowEvents){const slices=[];flowEvents.forEa...
  method belongToOtherInputs (line 1654) | belongToOtherInputs(slice,flowEvents){let fromOtherInputs=false;slice.it...
  method triggerOtherInputs (line 1654) | triggerOtherInputs(event,flowEvents){if(event.outFlowEvents===undefined|...
  method followSubsequentSlices (line 1657) | followSubsequentSlices(event,queue,visited,flowEvents){let stopFollowing...
  method followCurrentSlice (line 1662) | followCurrentSlice(event,queue,visited){event.outFlowEvents.forEach(func...
  method backtraceFromDraw (line 1662) | backtraceFromDraw(beginImplFrame,visited){const pendingEventQueue=[];pen...
  method sortRasterizerSlices (line 1662) | sortRasterizerSlices(rasterWorkerThreads,sortedRasterizerSlices){rasterW...
  method addRasterizationEvents (line 1663) | addRasterizationEvents(prepareTiles,rendererHelper,visited,flowEvents,so...
  method addOtherCausallyRelatedEvents (line 1666) | addOtherCausallyRelatedEvents(rendererHelper,sourceSlices,flowEvents,sor...
  method associatedEvents (line 1667) | get associatedEvents(){if(this.associatedEvents_.length!==0){return this...
  method inputLatency (line 1669) | get inputLatency(){if(!('data'in this.args))return undefined;const data=...
  function EventInfo (line 1670) | function EventInfo(title,description,docLinks){this.title=title;this.des...
  function Distribution (line 1718) | function Distribution(){}
  method computeDensity (line 1719) | computeDensity(x){throw Error('Not implemented');}
  method computePercentile (line 1719) | computePercentile(x){throw Error('Not implemented');}
  method computeComplementaryPercentile (line 1719) | computeComplementaryPercentile(x){return 1-this.computePercentile(x);}
  method mean (line 1719) | get mean(){throw Error('Not implemented');}
  method mode (line 1719) | get mode(){throw Error('Not implemented');}
  method median (line 1719) | get median(){throw Error('Not implemented');}
  method standardDeviation (line 1719) | get standardDeviation(){throw Error('Not implemented');}
  method variance (line 1719) | get variance(){throw Error('Not implemented');}
  method computeDensity (line 1719) | computeDensity(x){return 1/this.range.range;}
  method computePercentile (line 1719) | computePercentile(x){return tr.b.math.normalize(x,this.range.min,this.ra...
  method mean (line 1719) | get mean(){return this.range.center;}
  method mode (line 1719) | get mode(){return undefined;}
  method median (line 1719) | get median(){return this.mean;}
  method standardDeviation (line 1719) | get standardDeviation(){return Math.sqrt(this.variance);}
  method variance (line 1719) | get variance(){return Math.pow(this.range.range,2)/12;}
  method computeDensity (line 1719) | computeDensity(x){const scale=(1.0/(this.standardDeviation*Math.sqrt(2.0...
  method computePercentile (line 1719) | computePercentile(x){const standardizedX=((x-this.mean)/Math.sqrt(2.0*th...
  method mean (line 1719) | get mean(){return this.mean_;}
  method median (line 1719) | get median(){return this.mean;}
  method mode (line 1719) | get mode(){return this.mean;}
  method standardDeviation (line 1719) | get standardDeviation(){return this.standardDeviation_;}
  method variance (line 1719) | get variance(){return this.variance_;}
  method computeDensity (line 1719) | computeDensity(x){return this.normalDistribution_.computeDensity(Math.lo...
  method computePercentile (line 1719) | computePercentile(x){return this.normalDistribution_.computePercentile(M...
  method mean (line 1719) | get mean(){return Math.exp(this.normalDistribution_.mean+
  method variance (line 1720) | get variance(){const nm=this.normalDistribution_.mean;const nv=this.norm...
  method standardDeviation (line 1721) | get standardDeviation(){return Math.sqrt(this.variance);}
  method median (line 1721) | get median(){return Math.exp(this.normalDistribution_.mean);}
  method mode (line 1721) | get mode(){return Math.exp(this.normalDistribution_.mean-
  class HypothesisTestResult (line 1723) | class HypothesisTestResult{constructor(p,u,needMoreData,opt_alpha){this....
    method constructor (line 1723) | constructor(p,u,needMoreData,opt_alpha){this.p_=p;this.u_=u;this.needM...
    method p (line 1724) | get p(){return this.p_;}
    method U (line 1725) | get U(){return this.u_;}
    method significance (line 1726) | get significance(){return this.significance_;}
    method compare (line 1727) | compare(opt_alpha){const alpha=opt_alpha||Statistics.DEFAULT_ALPHA;if(...
    method asDict (line 1729) | asDict(){return{p:this.p,U:this.U,significance:this.significance,};}
  function UserExpectation (line 1730) | function UserExpectation(parentModel,initiatorType,start,duration){tr.mo...
  method computeCompoundEvenSelectionState (line 1731) | computeCompoundEvenSelectionState(selection){let cess=CompoundEventSelec...
  method associatedSamples (line 1734) | get associatedSamples(){const samples=new tr.model.EventSet();this.assoc...
  method userFriendlyName (line 1734) | get userFriendlyName(){return this.title+' User Expectation at '+
  method stableId (line 1735) | get stableId(){return('UserExpectation.'+this.guid);}
  method typeInfo (line 1735) | get typeInfo(){if(!this.typeInfo_){this.typeInfo_=UserExpectation.subTyp...
  method colorId (line 1737) | get colorId(){return this.typeInfo.metadata.colorId;}
  method stageTitle (line 1737) | get stageTitle(){return this.typeInfo.metadata.stageTitle;}
  method initiatorType (line 1737) | get initiatorType(){return this.initiatorType_;}
  method title (line 1737) | get title(){if(!this.initiatorType){return this.stageTitle;}
  method totalCpuMs (line 1738) | get totalCpuMs(){let cpuMs=0;this.associatedEvents.forEach(function(even...
  function AnimationExpectation (line 1739) | function AnimationExpectation(parentModel,initiatorTitle,start,duration)...
  method frameEvents (line 1740) | get frameEvents(){if(this.frameEvents_){return this.frameEvents_;}
  function ResponseExpectation (line 1741) | function ResponseExpectation(parentModel,initiatorTitle,start,duration,o...
  function ProtoExpectation (line 1742) | function ProtoExpectation(type,initiatorType){this.type=type;this.initia...
  function combineInitiatorTypes (line 1743) | function combineInitiatorTypes(title1,title2){for(const item of INITIATO...
  method isValid (line 1745) | get isValid(){return this.end>this.start;}
  method containsTypeNames (line 1745) | containsTypeNames(typeNames){return this.associatedEvents.some(x=>typeNa...
  method containsSliceTitle (line 1745) | containsSliceTitle(title){return this.associatedEvents.some(x=>title===x...
  method createInteractionRecord (line 1745) | createInteractionRecord(model){if(this.type!==ProtoExpectation.IGNORED_T...
  method merge (line 1748) | merge(other){this.initiatorType=combineInitiatorTypes(this.initiatorType...
  method pushEvent (line 1748) | pushEvent(event){this.start=Math.min(this.start,event.start);this.end=Ma...
  method pushSample (line 1748) | pushSample(sample){this.start=Math.min(this.start,sample.timestamp);this...
  method containsTimestampInclusive (line 1748) | containsTimestampInclusive(timestamp){return(this.start<=timestamp)&&(ti...
  method intersects (line 1748) | intersects(other){return(other.start<this.end)&&(other.end>this.start);}
  method isNear (line 1748) | isNear(event,threshold){return(this.end+threshold)>event.start;}
  method debug (line 1748) | debug(){let debugString=this.type+'(';debugString+=parseInt(this.start)+...
  function isXrDeviceServiceProcess (line 1748) | function isXrDeviceServiceProcess(process){if(process.name===XR_DEVICE_S...
  function compareEvents (line 1749) | function compareEvents(x,y){if(x.start!==y.start){return x.start-y.start;}
  function forEventTypesIn (line 1753) | function forEventTypesIn(events,typeNames,cb,opt_this){events.forEach(fu...
  function causedFrame (line 1754) | function causedFrame(event){return event.associatedEvents.some(isImplFra...
  function getSortedFrameEventsByProcess (line 1755) | function getSortedFrameEventsByProcess(modelHelper){const frameEventsByP...
  function getSortedInputEvents (line 1758) | function getSortedInputEvents(modelHelper){const inputEvents=[];const br...
  function findProtoExpectations (line 1761) | function findProtoExpectations(modelHelper,sortedInputEvents,warn){const...
  function handleKeyboardEvents (line 1762) | function handleKeyboardEvents(modelHelper,sortedInputEvents,warn){const ...
  function handleMouseResponseEvents (line 1763) | function handleMouseResponseEvents(modelHelper,sortedInputEvents,warn){c...
  function handleMouseWheelEvents (line 1764) | function handleMouseWheelEvents(modelHelper,sortedInputEvents,warn){cons...
  function handleMouseDragEvents (line 1767) | function handleMouseDragEvents(modelHelper,sortedInputEvents,warn){const...
  function handleTapResponseEvents (line 1775) | function handleTapResponseEvents(modelHelper,sortedInputEvents,warn){con...
  function handlePinchEvents (line 1779) | function handlePinchEvents(modelHelper,sortedInputEvents,warn){const pro...
  function handleFlingEvents (line 1783) | function handleFlingEvents(modelHelper,sortedInputEvents,warn){const pro...
  function handleTouchEvents (line 1790) | function handleTouchEvents(modelHelper,sortedInputEvents,warn){const pro...
  function handleScrollEvents (line 1796) | function handleScrollEvents(modelHelper,sortedInputEvents,warn){const pr...
  function handleVideoAnimations (line 1799) | function handleVideoAnimations(modelHelper,sortedInputEvents,warn){const...
  function handleVrAnimations (line 1803) | function handleVrAnimations(modelHelper,sortedInputEvents,warn){const ev...
  function handleCSSAnimations (line 1817) | function handleCSSAnimations(modelHelper,sortedInputEvents,warn){const a...
  function findWebGLEvents (line 1820) | function findWebGLEvents(modelHelper,mailboxEvents,animationEvents){for(...
  function findMailboxEventsNearAnimationEvents (line 1821) | function findMailboxEventsNearAnimationEvents(mailboxEvents,animationEve...
  function createProtoExpectationsFromMailboxEvents (line 1824) | function createProtoExpectationsFromMailboxEvents(mailboxEvents){const p...
  function handleWebGLAnimations (line 1826) | function handleWebGLAnimations(modelHelper,sortedInputEvents,warn){const...
  function postProcessProtoExpectations (line 1827) | function postProcessProtoExpectations(modelHelper,protoExpectations){pro...
  function mergeIntersectingResponses (line 1828) | function mergeIntersectingResponses(protoExpectations){const newPEs=[];w...
  function mergeIntersectingAnimations (line 1830) | function mergeIntersectingAnimations(protoExpectations){const newPEs=[];...
  function fixResponseAnimationStarts (line 1834) | function fixResponseAnimationStarts(protoExpectations){protoExpectations...
  function isImplFrameEvent (line 1839) | function isImplFrameEvent(event){return event.title===tr.model.helpers.I...
  function fixTapResponseTouchAnimations (line 1840) | function fixTapResponseTouchAnimations(protoExpectations){function isTap...
  function findFrameEventsForAnimations (line 1845) | function findFrameEventsForAnimations(modelHelper,protoExpectations){con...
  function checkAllInputEventsHandled (line 1850) | function checkAllInputEventsHandled(modelHelper,sortedInputEvents,protoE...
  function findInputExpectations (line 1853) | function findInputExpectations(modelHelper){let warning;function warn(w)...
  class FixedColorScheme (line 1855) | class FixedColorScheme{constructor(namesToColors){this.namesToColors_=na...
    method constructor (line 1855) | constructor(namesToColors){this.namesToColors_=namesToColors;}
    method fromNames (line 1856) | static fromNames(names){const namesToColors=new Map();const generator=...
    method getColor (line 1858) | getColor(name){const color=this.namesToColors_.get(name);if(color===un...
  function FixedColorSchemeRegistry (line 1859) | function FixedColorSchemeRegistry(){}
  function canonicalizeName (line 1860) | function canonicalizeName(name){return name.toLowerCase().replace(' ','_...
  function canonicalizeProcessName (line 1861) | function canonicalizeProcessName(rawProcessName){if(!rawProcessName)retu...
  function perceptualBlend (line 1864) | function perceptualBlend(ir,index,score){return Math.exp(1-score);}
  function filterExpectationsByRange (line 1865) | function filterExpectationsByRange(irs,opt_range){const filteredExpectat...
  function splitGlobalDumpsByBrowserName (line 1866) | function splitGlobalDumpsByBrowserName(model,opt_rangeOfInterest){const ...
  function makeKeyUniqueAndSet (line 1870) | function makeKeyUniqueAndSet(map,key,value){let uniqueKey=key;let nextIn...
  function skipDumpsThatDoNotIntersectRange (line 1872) | function skipDumpsThatDoNotIntersectRange(dumps,opt_range){if(!opt_range...
  function hasCategoryAndName (line 1873) | function hasCategoryAndName(event,category,title){return event.title===t...
  class EventFinderUtils (line 1874) | class EventFinderUtils{static hasCategoryAndName(event,category,title){r...
    method hasCategoryAndName (line 1874) | static hasCategoryAndName(event,category,title){return event.title===t...
    method getMainThreadEvents (line 1875) | static*getMainThreadEvents(rendererHelper,eventTitle,eventCategory){if...
    method getNetworkEventsInRange (line 1877) | static getNetworkEventsInRange(process,range){const networkEvents=[];f...
    method getSortedMainThreadEventsByFrame (line 1879) | static getSortedMainThreadEventsByFrame(rendererHelper,eventTitle,even...
    method getSortedMainThreadEventsByNavId (line 1882) | static getSortedMainThreadEventsByNavId(rendererHelper,eventTitle,even...
    method findLastEventStartingOnOrBeforeTimestamp (line 1884) | static findLastEventStartingOnOrBeforeTimestamp(sortedEvents,timestamp...
    method findLastEventStartingBeforeTimestamp (line 1885) | static findLastEventStartingBeforeTimestamp(sortedEvents,timestamp){co...
    method findNextEventStartingOnOrAfterTimestamp (line 1886) | static findNextEventStartingOnOrAfterTimestamp(sortedEvents,timestamp)...
    method findNextEventStartingAfterTimestamp (line 1888) | static findNextEventStartingAfterTimestamp(sortedEvents,timestamp){con...
    method findToplevelSchedulerTasks (line 1890) | static findToplevelSchedulerTasks(mainThread){const tasks=[];for(const...
  function getEndpoints_ (line 1892) | function getEndpoints_(events,startType,endType){const endpoints=[];for(...
  function reachedTTIQuiscence_ (line 1894) | function reachedTTIQuiscence_(timestamp,networkQuietWindowStart,mainThre...
  function findInteractiveTime (line 1896) | function findInteractiveTime(searchBegin,searchEnd,domContentLoadedEnd,l...
  function requiredFCIWindowSizeMs (line 1902) | function requiredFCIWindowSizeMs(timeSinceSearchBeginMs){const timeCoeff...
  class TaskCluster (line 1903) | class TaskCluster{constructor(tasksInClusterSorted){if(tasksInClusterSor...
    method constructor (line 1903) | constructor(tasksInClusterSorted){if(tasksInClusterSorted.length===0){...
    method start (line 1908) | get start(){return this._clusterTasks[0].start;}
    method end (line 1909) | get end(){return this._clusterTasks[this._clusterTasks.length-1].end;}
    method isHeavy (line 1910) | isHeavy(){return this.end-this.start>TASK_CLUSTER_HEAVINESS_THRESHOLD_...
  function findFCITaskClusters (line 1911) | function findFCITaskClusters(sortedLongTasks){const clusters=[];if(sorte...
  function reachedFCIQuiescence_ (line 1913) | function reachedFCIQuiescence_(timestamp,mainThreadQuietWindowStart,sear...
  function findFirstCpuIdleTime (line 1914) | function findFirstCpuIdleTime(searchBegin,searchEnd,domContentLoadedEnd,...
  function LoadExpectation (line 1919) | function LoadExpectation(parentModel,initiatorTitle,start,duration,rende...
  function findFrameLoaderSnapshotAt (line 1921) | function findFrameLoaderSnapshotAt(rendererHelper,frameIdRef,ts){const o...
  function findFirstMeaningfulPaintCandidates (line 1923) | function findFirstMeaningfulPaintCandidates(rendererHelper){const candid...
  function computeTotalBlockingTime_ (line 1927) | function computeTotalBlockingTime_(fcpTime,interactiveTime,topLevelTasks...
  function computeInteractivityMetricSample_ (line 1929) | function computeInteractivityMetricSample_(rendererHelper,navigationStar...
  function constructLoadingExpectation_ (line 1931) | function constructLoadingExpectation_(rendererHelper,frameToDomContentLo...
  function collectLoadExpectationsForRenderer (line 1933) | function collectLoadExpectationsForRenderer(rendererHelper){const sample...
  function findLoadExpectations (line 1940) | function findLoadExpectations(modelHelper){const loads=[];const chromeHe...
  function StartupExpectation (line 1942) | function StartupExpectation(parentModel,start,duration){tr.model.um.User...
  function getAllFrameEvents (line 1943) | function getAllFrameEvents(modelHelper){const frameEvents=[];frameEvents...
  function getStartupEvents (line 1945) | function getStartupEvents(modelHelper){function isStartupSlice(slice){re...
  function findStartupExpectations (line 1947) | function findStartupExpectations(modelHelper){const openingEvents=getSta...
  function getAssociatedEvents (line 1949) | function getAssociatedEvents(irs){const allAssociatedEvents=new tr.model...
  function getUnassociatedEvents (line 1950) | function getUnassociatedEvents(model,associatedEvents){const unassociate...
  function getTotalCpuDuration (line 1952) | function getTotalCpuDuration(events){let cpuMs=0;events.forEach(function...
  function getIRCoverageFromModel (line 1953) | function getIRCoverageFromModel(model){const associatedEvents=getAssocia...
  function IdleExpectation (line 1955) | function IdleExpectation(parentModel,start,duration){const initiatorTitl...
  class UserModelBuilder (line 1956) | class UserModelBuilder{constructor(model){this.model=model;this.modelHel...
    method constructor (line 1956) | constructor(model){this.model=model;this.modelHelper=model.getOrCreate...
    method supportsModelHelper (line 1957) | static supportsModelHelper(modelHelper){return modelHelper.browserHelp...
    method buildUserModel (line 1958) | buildUserModel(){if(!this.modelHelper||!this.modelHelper.browserHelper...
    method findSegments (line 1960) | findSegments(){let timestamps=new Set();for(const expectation of this....
    method findUserExpectations (line 1963) | findUserExpectations(){const expectations=[];expectations.push.apply(e...
    method collectUnassociatedEvents_ (line 1964) | collectUnassociatedEvents_(expectations){const vacuumUEs=[];for(const ...
    method findIdleExpectations (line 1966) | findIdleExpectations(otherUEs){if(this.model.bounds.isEmpty)return;con...
  function createCustomizeModelLinesFromModel (line 1968) | function createCustomizeModelLinesFromModel(model){const modelLines=[];m...
  function createExpectedUELinesFromModel (line 1974) | function createExpectedUELinesFromModel(model){const expectedLines=[];co...
  function createUEFinderTestCaseStringFromModel (line 1976) | function createUEFinderTestCaseStringFromModel(model){const filename=win...
  function decorate (line 1977) | function decorate(source,constr){let elements;if(typeof source==='string...
  function define (line 1979) | function define(className,opt_parentConstructor,opt_tagNS){if(typeof cla...
  function elementIsChildOf (line 1988) | function elementIsChildOf(el,potentialParent){if(el===potentialParent)re...
  function Rect (line 1990) | function Rect(){this.x=0;this.y=0;this.width=0;this.height=0;}
  method left (line 1992) | get left(){return this.x;}
  method top (line 1992) | get top(){return this.y;}
  method right (line 1992) | get right(){return this.x+this.width;}
  method bottom (line 1992) | get bottom(){return this.y+this.height;}
  method toString (line 1992) | toString(){return'Rect('+this.x+', '+this.y+', '+
  method toArray (line 1993) | toArray(){return[this.x,this.y,this.width,this.height];}
  method clone (line 1993) | clone(){const rect=new Rect();rect.x=this.x;rect.y=this.y;rect.width=thi...
  method enlarge (line 1993) | enlarge(pad){const rect=new Rect();this.enlargeFast(rect,pad);return rect;}
  method enlargeFast (line 1993) | enlargeFast(out,pad){out.x=this.x-pad;out.y=this.y-pad;out.width=this.wi...
  method size (line 1993) | size(){return{width:this.width,height:this.height};}
  method scale (line 1993) | scale(s){const rect=new Rect();this.scaleFast(rect,s);return rect;}
  method scaleSize (line 1993) | scaleSize(s){return Rect.fromXYWH(this.x,this.y,this.width*s,this.height...
  method scaleFast (line 1993) | scaleFast(out,s){out.x=this.x*s;out.y=this.y*s;out.width=this.width*s;ou...
  method translate (line 1993) | translate(v){const rect=new Rect();this.translateFast(rect,v);return rect;}
  method translateFast (line 1993) | translateFast(out,v){out.x=this.x+v[0];out.y=this.x+v[1];out.width=this....
  method asUVRectInside (line 1993) | asUVRectInside(containingRect){const rect=new Rect();rect.x=(this.x-cont...
  method intersects (line 1993) | intersects(that){let ok=true;ok&=this.x<that.right;ok&=this.right>that.x...
  method equalTo (line 1993) | equalTo(rect){return rect&&(this.x===rect.x)&&(this.y===rect.y)&&(this.w...
  function instantiateTemplate (line 1993) | function instantiateTemplate(selector,doc){doc=doc||document;const el=Po...
  function windowRectForElement (line 1995) | function windowRectForElement(element){const position=[element.offsetLef...
  function scrollIntoViewIfNeeded (line 1997) | function scrollIntoViewIfNeeded(el){const pr=el.parentElement.getBoundin...
  function extractUrlString (line 1998) | function extractUrlString(url){let extracted=url.replace(/url\((.*)\)/,'...
  function toThreeDigitLocaleString (line 1999) | function toThreeDigitLocaleString(value){return value.toLocaleString(und...
  function isUnknownElementName (line 2000) | function isUnknownElementName(name){return document.createElement(name)i...
  method decorate (line 2001) | decorate(){Polymer.dom(this).classList.add('overlay');this.parentEl_=thi...
  method userCanClose (line 2001) | set userCanClose(userCanClose){this.userCanClose_=userCanClose;this.clos...
  method buttons (line 2001) | get buttons(){return Polymer.dom(this.shadow_).querySelector('button-bar...
  method visible (line 2001) | get visible(){return this.visible_;}
  method visible (line 2001) | set visible(newValue){if(this.visible_===newValue)return;this.visible_=n...
  method onVisibleChange_ (line 2001) | onVisibleChange_(){this.visible_?this.show_():this.hide_();}
  method show_ (line 2001) | show_(){Polymer.dom(this.parentEl_).appendChild(this);if(this.userCanClo...
  method hide_ (line 2003) | hide_(){Polymer.dom(this.parentEl_).removeChild(this);this.parentEl_.rem...
  method onClose_ (line 2004) | onClose_(e){this.visible=false;if((e.type!=='keydown')||(e.type==='keydo...
  method onFocusIn_ (line 2005) | onFocusIn_(e){let node=e.target;while(node){if(node===this){return;}
  method didButtonBarMutate_ (line 2007) | didButtonBarMutate_(e){const hasButtons=this.buttons.children.length>0;i...
  method onKeyDown_ (line 2007) | onKeyDown_(e){if(e.keyCode===9&&e.shiftKey&&e.target===this){e.preventDe...
  method onClick_ (line 2008) | onClick_(e){e.stopPropagation();}
  method onDocumentClick_ (line 2008) | onDocumentClick_(e){if(!this.userCanClose_)return;this.onClose_(e);}
  function ImportOptions (line 2009) | function ImportOptions(){this.shiftWorldToZero=true;this.pruneEmptyConta...
  function Import (line 2010) | function Import(model,opt_options){if(model===undefined){throw new Error...
  method importTraces (line 2012) | importTraces(traces){const progressMeter={update(msg){}};tr.b.Task.RunSy...
  method importTracesWithProgressDialog (line 2012) | importTracesWithProgressDialog(traces){if(tr.isHeadless){throw new Error...
  method createImportTracesTask (line 2013) | createImportTracesTask(progressMeter,traces){const importStartTimeMs=tr....
  method createImporter_ (line 2021) | createImporter_(eventData){const importerConstructor=tr.importer.Importe...
  method hasEventDataDecoder_ (line 2022) | hasEventDataDecoder_(importers){for(let i=0;i<importers.length;++i){if(!...
  function readFile (line 2023) | function readFile(fileBlob){return new Promise(function(resolve,reject){...
  function HotKey (line 2024) | function HotKey(dict){if(dict.eventType===undefined){throw new Error('ev...
  method eventType (line 2030) | get eventType(){return this.eventType_;}
  method keyCodes (line 2030) | get keyCodes(){return this.keyCodes_;}
  method helpText (line 2030) | get helpText(){return this.helpText_;}
  method call (line 2030) | call(e){this.callback_.call(this.thisArg_,e);}
  method pushKeyCode_ (line 2030) | pushKeyCode_(keyCode){this.keyCodes_.push(keyCode);}
  method created (line 2030) | created(){this.isAttached_=false;this.globalMode_=false;this.slavedToPar...
  method attached (line 2030) | attached(){this.isAttached_=true;const host=this.findHost_();if(host.__h...
  method detached (line 2033) | detached(){this.isAttached_=false;const host=this.curHost_;if(!host)retu...
  method addChildController_ (line 2034) | addChildController_(controller){const i=this.childControllers_.indexOf(c...
  method removeChildController_ (line 2035) | removeChildController_(controller){const i=this.childControllers_.indexO...
  method getKeyMapForEventType_ (line 2036) | getKeyMapForEventType_(eventType,useCapture){if(eventType==='keydown'){i...
  method addHotKey (line 2040) | addHotKey(hotKey){if(!(hotKey instanceof tr.ui.b.HotKey)){throw new Erro...
  method removeHotKey (line 2043) | removeHotKey(hotKey){if(!(hotKey instanceof tr.ui.b.HotKey)){throw new E...
  method globalMode (line 2047) | get globalMode(){return this.globalMode_;}
  method globalMode (line 2047) | set globalMode(globalMode){const wasAttached=this.isAttached_;if(wasAtta...
  method topmostConroller_ (line 2048) | get topmostConroller_(){if(this.slavedToParentController_){return this.s...
  method childRequestsGeneralFocus (line 2049) | childRequestsGeneralFocus(child){const topmost=this.topmostConroller_;if...
  method childRequestsBlur (line 2049) | childRequestsBlur(child){child.blur();const topmost=this.topmostConrolle...
  method findHost_ (line 2049) | findHost_(){if(this.globalMode_)return wrap(document.body);if(this.paren...
  method appendMatchingHotKeysTo_ (line 2049) | appendMatchingHotKeysTo_(matchedHotKeys,useCapture,e){const localKeyMap=...
  method onKey_ (line 2050) | onKey_(useCapture,e){if(!useCapture&&e.path[0].tagName==='INPUT')return;...
  function getHotkeyControllerForElement (line 2051) | function getHotkeyControllerForElement(refElement){let curElement=refEle...
  function findHost (line 2056) | function findHost(initialNode){let node=initialNode;while(Polymer.dom(no...
  function Settings (line 2058) | function Settings(){return Settings;}
  function SessionSettings (line 2060) | function SessionSettings(){return SessionSettings;}
  function AddStaticStorageFunctionsToClass_ (line 2061) | function AddStaticStorageFunctionsToClass_(inputClass,storage){inputClas...
  function HeadlessStorage (line 2066) | function HeadlessStorage(){this.length=0;this.hasItem_={};this.items_={}...
  method key (line 2067) | key(index){return this.itemsAsArray[index];}
  method itemsAsArray (line 2067) | get itemsAsArray(){if(this.itemsAsArray_!==undefined){return this.itemsA...
  method getItem (line 2069) | getItem(key){if(!this.hasItem_[key]){return null;}
  method removeItem (line 2070) | removeItem(key){if(!this.hasItem_[key]){return;}
  method setItem (line 2071) | setItem(key,value){if(this.hasItem_[key]){this.items_[key]=value;return;}
  function createSpan (line 2073) | function createSpan(opt_dictionary){let ownerDocument=document;if(opt_di...
  function createLink (line 2085) | function createLink(opt_args){let ownerDocument=document;if(opt_args&&op...
  function createDiv (line 2089) | function createDiv(opt_dictionary){const divEl=document.createElement('d...
  function createScopedStyle (line 2094) | function createScopedStyle(styleContent){const styleEl=document.createEl...
  function valuesEqual (line 2095) | function valuesEqual(a,b){if(a instanceof Array&&b instanceof Array){ret...
  function createSelector (line 2097) | function createSelector(targetEl,targetElProperty,settingsKey,defaultVal...
  function createEditCategorySpan (line 2106) | function createEditCategorySpan(optionGroupEl,targetEl){const spanEl=cre...
  function createOptionGroup (line 2107) | function createOptionGroup(targetEl,targetElProperty,settingsKey,default...
  function createCheckBox (line 2113) | function createCheckBox(targetEl,targetElProperty,settingsKey,defaultVal...
  function createButton (line 2119) | function createButton(label,opt_callback,opt_this){const buttonEl=docume...
  function createTextInput (line 2122) | function createTextInput(targetEl,targetElProperty,settingsKey,defaultVa...
  function isElementAttachedToDocument (line 2124) | function isElementAttachedToDocument(el){let cur=el;while(Polymer.dom(cu...
  function asHTMLOrTextNode (line 2126) | function asHTMLOrTextNode(value,opt_ownerDocument){if(value instanceof N...
  method ready (line 2128) | ready(){this.messageEl_=this.$.message;this.buttonsEl_=this.$.buttons;th...
  method message (line 2128) | get message(){return Polymer.dom(this.messageEl_).textContent;}
  method message (line 2128) | set message(message){Polymer.dom(this.messageEl_).textContent=message;}
  method visible (line 2128) | get visible(){return!this.hidden;}
  method visible (line 2128) | set visible(visible){this.hidden=!visible;}
  method removeAllButtons (line 2128) | removeAllButtons(){Polymer.dom(this.buttonsEl_).textContent='';}
  method addButton (line 2128) | addButton(text,clickCallback){const button=document.createElement('butto...
  method ready (line 2128) | ready(){this.messages_=[];}
  method messageCount (line 2128) | get messageCount(){return this.messages_.length;}
  method clearMessages (line 2128) | clearMessages(){this.messages_=[];this.updateContents_();}
  method addMessage (line 2128) | addMessage(text,opt_buttons){opt_buttons=opt_buttons||[];for(let i=0;i<o...
  method updateContents_ (line 2130) | updateContents_(){Polymer.dom(this.$.messages).textContent='';this.messa...
  class DevtoolsStream (line 2130) | class DevtoolsStream{constructor(connection,streamHandle){this.connectio...
    method constructor (line 2130) | constructor(connection,streamHandle){this.connection_=connection;this....
    method read (line 2131) | async read(){if(this.closed_){throw new Error('stream is closed');}
    method close (line 2140) | close(){this.closed_=true;return this.connection_.req('IO.close',{hand...
    method readAndClose (line 2141) | async readAndClose(){const data=await this.read();this.close();return ...
  class InspectorConnection (line 2142) | class InspectorConnection{constructor(windowGlobal){if(!windowGlobal.Dev...
    method constructor (line 2142) | constructor(windowGlobal){if(!windowGlobal.DevToolsHost){throw new Err...
    method req (line 2144) | req(method,params){const id=this.nextRequestId_++;const msg=JSON.strin...
    method setNotificationListener (line 2145) | setNotificationListener(method,listener){this.notificationListenersByM...
    method dispatchMessage_ (line 2146) | dispatchMessage_(payload){const isStringPayload=typeof payload==='stri...
    method installDevToolsAPI_ (line 2151) | installDevToolsAPI_(windowGlobal){windowGlobal.DevToolsAPI={setToolbar...
  class TracingControllerClient (line 2152) | class TracingControllerClient{beginMonitoring(monitoringOptions){}
    method beginMonitoring (line 2152) | beginMonitoring(monitoringOptions){}
    method endMonitoring (line 2153) | endMonitoring(){}
    method captureMonitoring (line 2154) | captureMonitoring(){}
    method getMonitoringStatus (line 2155) | getMonitoringStatus(){}
    method getCategories (line 2156) | getCategories(){}
    method beginRecording (line 2157) | beginRecording(recordingOptions){}
    method beginGetBufferPercentFull (line 2158) | beginGetBufferPercentFull(){}
    method endRecording (line 2159) | endRecording(){}
    method defaultTraceName (line 2160) | defaultTraceName(){}
  function createResolvedPromise (line 2161) | function createResolvedPromise(data){const promise=new Promise(function(...
  function appendTraceChunksTo (line 2162) | function appendTraceChunksTo(chunks,messageString){if(typeof messageStri...
  class InspectorTracingControllerClient (line 2166) | class InspectorTracingControllerClient extends
    method constructor (line 2167) | constructor(connection){super();this.recording_=false;this.bufferUsage...
    method beginMonitoring (line 2168) | beginMonitoring(monitoringOptions){throw new Error('Not implemented');}
    method endMonitoring (line 2169) | endMonitoring(){throw new Error('Not implemented');}
    method captureMonitoring (line 2170) | captureMonitoring(){throw new Error('Not implemented');}
    method getMonitoringStatus (line 2171) | getMonitoringStatus(){return createResolvedPromise({isMonitoring:false...
    method getCategories (line 2172) | getCategories(){const res=this.conn_.req('Tracing.getCategories',{});r...
    method beginRecording (line 2173) | beginRecording(recordingOptions){if(this.recording_){throw new Error('...
    method onBufferUsageUpdateFromInspector_ (line 2180) | onBufferUsageUpdateFromInspector_(params){this.bufferUsage_=params.val...
    method beginGetBufferPercentFull (line 2181) | beginGetBufferPercentFull(){return tr.b.timeout(100).then(()=>this.buf...
    method onDataCollected_ (line 2182) | onDataCollected_(messageString){appendTraceChunksTo(this.currentTraceT...
    method endRecording (line 2183) | async endRecording(){if(this.recording_===false){return createResolved...
    method defaultTraceName (line 2188) | defaultTraceName(){return this.traceName_;}
  function makeCaseInsensitiveRegex (line 2189) | function makeCaseInsensitiveRegex(pattern){pattern=pattern.replace(/[.*+...
  function Filter (line 2190) | function Filter(){}
  method matchCounter (line 2191) | matchCounter(counter){return true;}
  method matchCpu (line 2191) | matchCpu(cpu){return true;}
  method matchProcess (line 2191) | matchProcess(process){return true;}
  method matchSlice (line 2191) | matchSlice(slice){return true;}
  method matchThread (line 2191) | matchThread(thread){return true;}
  function TitleOrCategoryFilter (line 2191) | function TitleOrCategoryFilter(text){Filter.call(this);this.regex_=makeC...
  method matchSlice (line 2192) | matchSlice(slice){if(slice.title===undefined&&slice.category===undefined...
  function ExactTitleFilter (line 2193) | function ExactTitleFilter(text){Filter.call(this);this.text_=text;if(!te...
  method matchSlice (line 2194) | matchSlice(slice){return slice.title===this.text_;}
  function FullTextFilter (line 2194) | function FullTextFilter(text){Filter.call(this);this.regex_=makeCaseInse...
  method matchObject_ (line 2195) | matchObject_(obj){for(const key in obj){if(!obj.hasOwnProperty(key))cont...
  method matchSlice (line 2196) | matchSlice(slice){if(this.titleOrCategoryFilter_.matchSlice(slice))retur...
  method decorate (line 2196) | decorate(){tr.ui.b.Overlay.prototype.decorate.call(this);this.title='Rec...
  method supportsSystemTracing (line 2196) | set supportsSystemTracing(s){if(s){this.systemTracingBn_.style.display=u...
  method tracingRecordMode (line 2196) | get tracingRecordMode(){return this.tracingRecordModeSltr_.selectedValue;}
  method tracingRecordMode (line 2196) | set tracingRecordMode(value){this.tracingRecordMode_=value;}
  method useSystemTracing (line 2196) | get useSystemTracing(){return this.systemTracingBn_.checked;}
  method useSystemTracing (line 2196) | set useSystemTracing(value){this.systemTracingBn_.checked=!!value;}
  method useSampling (line 2196) | get useSampling(){return this.samplingTracingBn_.checked;}
  method useSampling (line 2196) | set useSampling(value){this.samplingTracingBn_.checked=!!value;}
  method categories (line 2196) | set categories(c){if(!(c instanceof Array)){throw new Error('categories ...
  method settings_key (line 2197) | set settings_key(k){this.settings_key_=k;}
  method settings (line 2197) | set settings(s){throw new Error('Dont use this!');}
  method usingPreset_ (line 2197) | usingPreset_(){return this.currentlyChosenPreset_.length>0;}
  method currentlyChosenPreset (line 2197) | get currentlyChosenPreset(){return this.currentlyChosenPreset_;}
  method currentlyChosenPreset (line 2197) | set currentlyChosenPreset(preset){if(!(preset instanceof Array)){throw n...
  method updateManualSelectionView_ (line 2199) | updateManualSelectionView_(){const classList=Polymer.dom(this.categories...
  method updateCategoryColumnView_ (line 2199) | updateCategoryColumnView_(shouldReadFromSettings){const categorySet=Poly...
  method onClickEditCategories (line 2199) | onClickEditCategories(){if(!this.usingPreset_())return;if(!this.editCate...
  method changeEditCategoriesState_ (line 2201) | changeEditCategoriesState_(editCategoriesState){const presetOptionsGroup...
  method updatePresetDescription_ (line 2201) | updatePresetDescription_(){const description=Polymer.dom(this).querySele...
  method includedAndExcludedCategories (line 2201) | includedAndExcludedCategories(){let includedCategories=[];let excludedCa...
  method clickRecordButton (line 2203) | clickRecordButton(){this.recordButtonEl_.click();}
  method onRecordButtonClicked_ (line 2203) | onRecordButtonClicked_(){this.visible=false;tr.b.dispatchSimpleEvent(thi...
  method collectInputs_ (line 2203) | collectInputs_(inputs,isChecked){const inputsLength=inputs.length;const ...
  method unselectedCategories_ (line 2204) | unselectedCategories_(){const inputs=Polymer.dom(this.enabledCategoriesC...
  method enabledDisabledByDefaultCategories_ (line 2204) | enabledDisabledByDefaultCategories_(){const inputs=Polymer.dom(this.disa...
  method onVisibleChange_ (line 2204) | onVisibleChange_(){if(this.visible){this.updateForm_();}}
  method buildInputs_ (line 2204) | buildInputs_(inputs,checkedDefault,parent){const inputsLength=inputs.len...
  method allCategories_ (line 2204) | allCategories_(){const categorySet={};const allCategories=this.categorie...
  method updateForm_ (line 2205) | updateForm_(){function ignoreCaseCompare(a,b){return a.toLowerCase().loc...
  method updateSetting_ (line 2208) | updateSetting_(e){const checkbox=e.target;tr.b.Settings.set(checkbox.val...
  method createGroupSelectButtons_ (line 2208) | createGroupSelectButtons_(parent){const flipInputs=function(dir){const i...
  method setWarningDialogOverlayText_ (line 2208) | setWarningDialogOverlayText_(messages){const contentDiv=document.createE...
  method createDefaultDisabledWarningDialog_ (line 2209) | createDefaultDisabledWarningDialog_(warningLink){function onClickHandler...
  function beginRecording (line 2210) | function beginRecording(tracingControllerClient){let finalPromiseResolve...
  function endRecording (line 2222) | function endRecording(tracingControllerClient){return tracingControllerC...
  function defaultTraceName (line 2223) | function defaultTraceName(tracingControllerClient){return tracingControl...
  function UserCancelledError (line 2224) | function UserCancelledError(){Error.apply(this,arguments);}
  function beginXhr (line 2225) | function beginXhr(method,path,data){if(data===undefined)data=null;return...
  function XhrBasedTracingControllerClient (line 2227) | function XhrBasedTracingControllerClient(){}
  method beginMonitoring (line 2228) | beginMonitoring(monitoringOptions){const monitoringOptionsB64=Base64.bto...
  method endMonitoring (line 2228) | endMonitoring(){return beginXhr('GET','/json/end_monitoring');}
  method captureMonitoring (line 2228) | captureMonitoring(){return beginXhr('GET','/json/capture_monitoring_comp...
  method getMonitoringStatus (line 2228) | getMonitoringStatus(){return beginXhr('GET','/json/get_monitoring_status...
  method getCategories (line 2228) | getCategories(){return beginXhr('GET','/json/categories').then(function(...
  method beginRecording (line 2228) | beginRecording(recordingOptions){const recordingOptionsB64=Base64.btoa(J...
  method beginGetBufferPercentFull (line 2229) | beginGetBufferPercentFull(){return beginXhr('GET','/json/get_buffer_perc...
  method endRecording (line 2229) | endRecording(){return beginXhr('GET','/json/end_recording_compressed').t...
  method defaultTraceName (line 2229) | defaultTraceName(){return'trace.json.gz';}
  function ScriptingObject (line 2229) | function ScriptingObject(){}
  method onModelChanged (line 2230) | onModelChanged(model){}
  function ScriptingController (line 2230) | function ScriptingController(brushingStateController){this.brushingState...
  function ScriptingObjectRegistry (line 2231) | function ScriptingObjectRegistry(){}
  method brushingStateController (line 2232) | get brushingStateController(){return this.brushingStateController_;}
  method onModelChanged_ (line 2232) | onModelChanged_(){this.scriptObjectValues_.forEach(function(v){if(v.onMo...
  method addScriptObject (line 2232) | addScriptObject(name,value){this.scriptObjectNames_.push(name);this.scri...
  method executeCommand (line 2232) | executeCommand(command){const f=new Function(this.scriptObjectNames_,'re...
  function MetricRegistry (line 2232) | function MetricRegistry(){}
  function camelCaseToHackerString (line 2233) | function camelCaseToHackerString(camelCase){let hackerString='';for(cons...
  function getCallStack (line 2235) | function getCallStack(){try{throw new Error();}catch(error){return error...
  function getPathsFromStack (line 2236) | function getPathsFromStack(stack){return stack.split('\n').map(line=>{li...
  class RunningStatistics (line 2244) | class RunningStatistics{constructor(){this.mean_=0;this.count_=0;this.ma...
    method constructor (line 2244) | constructor(){this.mean_=0;this.count_=0;this.max_=-Infinity;this.min_...
    method count (line 2245) | get count(){return this.count_;}
    method geometricMean (line 2246) | get geometricMean(){if(this.meanlogs_===undefined)return 0;return Math...
    method mean (line 2247) | get mean(){if(this.count_===0)return undefined;return this.mean_;}
    method max (line 2248) | get max(){return this.max_;}
    method min (line 2249) | get min(){return this.min_;}
    method sum (line 2250) | get sum(){return this.sum_;}
    method variance (line 2251) | get variance(){if(this.count_===0)return undefined;if(this.count_===1)...
    method stddev (line 2252) | get stddev(){if(this.count_===0)return undefined;return Math.sqrt(this...
    method add (line 2253) | add(x){this.count_++;this.max_=Math.max(this.max_,x);this.min_=Math.mi...
    method merge (line 2256) | merge(other){const result=new RunningStatistics();result.count_=this.c...
    method truncate (line 2260) | truncate(unit){this.max_=unit.truncate(this.max_);if(this.meanlogs_!==...
    method asDict (line 2263) | asDict(){if(!this.count){return[];}
    method fromDict (line 2265) | static fromDict(dict){const result=new RunningStatistics();if(dict.len...
  class Scalar (line 2267) | class Scalar{constructor(unit,value){if(!(unit instanceof tr.b.Unit)){th...
    method constructor (line 2267) | constructor(unit,value){if(!(unit instanceof tr.b.Unit)){throw new Err...
    method asDict (line 2270) | asDict(){return{unit:this.unit.asJSON(),value:tr.b.numberToJson(this.v...
    method toString (line 2271) | toString(){return this.unit.format(this.value);}
    method fromDict (line 2272) | static fromDict(d){return new Scalar(tr.b.Unit.fromJSON(d.unit),tr.b.n...
    method constructor (line 2401) | constructor(value){super();if(!(value instanceof tr.b.Scalar)){throw n...
    method clone (line 2403) | clone(){return new Scalar(this.value);}
    method serialize (line 2404) | serialize(serializer){return this.value.asDict();}
    method asDictInto_ (line 2405) | asDictInto_(d){d.value=this.value.asDict();}
    method deserialize (line 2406) | static deserialize(value,deserializer){return Scalar.fromDict({value});}
    method fromDict (line 2407) | static fromDict(d){return new Scalar(tr.b.Scalar.fromDict(d.value));}
  class Diagnostic (line 2273) | class Diagnostic{constructor(){this.guid_=undefined;}
    method constructor (line 2273) | constructor(){this.guid_=undefined;}
    method clone (line 2274) | clone(){return new this.constructor();}
    method canAddDiagnostic (line 2275) | canAddDiagnostic(otherDiagnostic){return false;}
    method addDiagnostic (line 2276) | addDiagnostic(otherDiagnostic){throw new Error('Abstract virtual metho...
    method guid (line 2277) | get guid(){if(this.guid_===undefined){this.guid_=tr.b.GUID.allocateUUI...
    method guid (line 2279) | set guid(guid){if(this.guid_!==undefined){throw new Error('Cannot rese...
    method hasGuid (line 2281) | get hasGuid(){return this.guid_!==undefined;}
    method asDictOrReference (line 2282) | asDictOrReference(){if(this.guid_!==undefined){return this.guid_;}
    method asDict (line 2284) | asDict(){const result={type:this.constructor.name};if(this.guid_!==und...
    method asDictInto_ (line 2286) | asDictInto_(d){throw new Error('Abstract virtual method: subclasses mu...
    method fromDict (line 2287) | static fromDict(d){const typeInfo=Diagnostic.findTypeInfoWithName(d.ty...
    method deserialize (line 2289) | static deserialize(type,d,deserializer){const typeInfo=Diagnostic.find...
  class Breakdown (line 2293) | class Breakdown extends tr.v.d.Diagnostic{constructor(){super();this.val...
    method constructor (line 2293) | constructor(){super();this.values_=new Map();this.colorScheme='';}
    method truncate (line 2294) | truncate(unit){for(const[name,value]of this){this.values_.set(name,uni...
    method clone (line 2295) | clone(){const clone=new Breakdown();clone.colorScheme=this.colorScheme...
    method equals (line 2296) | equals(other){if(this.colorScheme!==other.colorScheme)return false;if(...
    method canAddDiagnostic (line 2298) | canAddDiagnostic(otherDiagnostic){return((otherDiagnostic instanceof B...
    method addDiagnostic (line 2299) | addDiagnostic(otherDiagnostic){for(const[name,value]of otherDiagnostic...
    method set (line 2301) | set(name,value){if(typeof name!=='string'||typeof value!=='number'){th...
    method get (line 2303) | get(name){return this.values_.get(name)||0;}
    method size (line 2304) | get size(){return this.values_.size;}
    method serialize (line 2305) | serialize(serializer){const keys=[...this.values_.keys()];keys.sort();...
    method asDictInto_ (line 2306) | asDictInto_(d){d.values={};for(const[name,value]of this){d.values[name...
    method fromEntries (line 2308) | static fromEntries(entries){const breakdown=new Breakdown();for(const[...
    method deserialize (line 2310) | static deserialize(data,deserializer){const breakdown=new Breakdown();...
    method fromDict (line 2312) | static fromDict(d){const breakdown=new Breakdown();for(const[name,valu...
  method [Symbol.iterator] (line 2303) | *[Symbol.iterator](){for(const pair of this.values_){yield pair;}}
  class CollectedRelatedEventSet (line 2315) | class CollectedRelatedEventSet extends tr.v.d.Diagnostic{constructor(){s...
    method constructor (line 2315) | constructor(){super();this.eventSetsByCanonicalUrl_=new Map();}
    method asDictInto_ (line 2316) | asDictInto_(d){d.events={};for(const[canonicalUrl,eventSet]of this){d....
    method deserialize (line 2317) | static deserialize(events,deserializer){return CollectedRelatedEventSe...
    method serialize (line 2318) | serialize(serializer){const d={};this.asDictInto(d);return d.events;}
    method fromDict (line 2319) | static fromDict(d){const result=new CollectedRelatedEventSet();for(con...
    method size (line 2321) | get size(){return this.eventSetsByCanonicalUrl_.size;}
    method get (line 2322) | get(canonicalUrl){return this.eventSetsByCanonicalUrl_.get(canonicalUr...
    method canAddDiagnostic (line 2323) | canAddDiagnostic(otherDiagnostic){return otherDiagnostic instanceof tr...
    method addEventSetForCanonicalUrl (line 2324) | addEventSetForCanonicalUrl(canonicalUrl,events){let myEventSet=this.ev...
    method addDiagnostic (line 2326) | addDiagnostic(otherDiagnostic){if(otherDiagnostic instanceof tr.v.d.Co...
  method [Symbol.iterator] (line 2322) | *[Symbol.iterator](){for(const[canonicalUrl,eventSet]of this.eventSetsBy...
  class DateRange (line 2329) | class DateRange extends tr.v.d.Diagnostic{constructor(ms){super();this.r...
    method constructor (line 2329) | constructor(ms){super();this.range_=new tr.b.math.Range();this.range_....
    method minTimestamp (line 2330) | get minTimestamp(){return this.range_.min;}
    method maxTimestamp (line 2331) | get maxTimestamp(){return this.range_.max;}
    method minDate (line 2332) | get minDate(){return new Date(this.range_.min);}
    method maxDate (line 2333) | get maxDate(){return new Date(this.range_.max);}
    method durationMs (line 2334) | get durationMs(){return this.range_.duration;}
    method clone (line 2335) | clone(){const clone=new tr.v.d.DateRange(this.range_.min);clone.addDia...
    method equals (line 2336) | equals(other){if(!(other instanceof DateRange))return false;return thi...
    method canAddDiagnostic (line 2337) | canAddDiagnostic(otherDiagnostic){return otherDiagnostic instanceof Da...
    method addDiagnostic (line 2338) | addDiagnostic(other){this.range_.addRange(other.range_);}
    method toString (line 2339) | toString(){const minDate=tr.b.formatDate(this.minDate);if(this.duratio...
    method serialize (line 2340) | serialize(serializer){if(this.durationMs===0)return this.range_.min;re...
    method asDictInto_ (line 2341) | asDictInto_(d){d.min=this.range_.min;if(this.durationMs===0)return;d.m...
    method deserialize (line 2342) | static deserialize(data,deserializer){if(data instanceof Array){const ...
    method fromDict (line 2344) | static fromDict(d){const dateRange=new DateRange(d.min);if(d.max!==und...
  class DiagnosticRef (line 2345) | class DiagnosticRef{constructor(guid){this.guid=guid;}
    method constructor (line 2345) | constructor(guid){this.guid=guid;}
    method asDict (line 2346) | asDict(){return this.guid;}
    method asDictOrReference (line 2347) | asDictOrReference(){return this.asDict();}
  function stableStringify (line 2348) | function stableStringify(obj){let replacer;if(!(obj instanceof Array)&&o...
  class GenericSet (line 2350) | class GenericSet extends tr.v.d.Diagnostic{constructor(values){super();i...
    method constructor (line 2350) | constructor(values){super();if(typeof values[Symbol.iterator]!=='funct...
    method size (line 2352) | get size(){return this.values_.size;}
    method length (line 2353) | get length(){return this.values_.size;}
    method has (line 2354) | has(value){if(typeof value!=='object')return this.values_.has(value);c...
    method equals (line 2356) | equals(other){if(!(other instanceof GenericSet))return false;if(this.s...
    method hashKey (line 2358) | get hashKey(){if(this.has_objects_)return undefined;if(this.hash_key_!...
    method serialize (line 2361) | serialize(serializer){const i=[...this].map(x=>serializer.getOrAllocat...
    method asDictInto_ (line 2362) | asDictInto_(d){d.values=Array.from(this);}
    method deserialize (line 2363) | static deserialize(data,deserializer){if(!(data instanceof Array)){dat...
    method fromDict (line 2365) | static fromDict(d){return new GenericSet(d.values);}
    method clone (line 2366) | clone(){return new GenericSet(this.values_);}
    method canAddDiagnostic (line 2367) | canAddDiagnostic(otherDiagnostic){return otherDiagnostic instanceof Ge...
    method addDiagnostic (line 2368) | addDiagnostic(otherDiagnostic){const jsons=new Set();for(const value o...
  method [Symbol.iterator] (line 2353) | *[Symbol.iterator](){for(const value of this.values_){yield value;}}
  class EventRef (line 2372) | class EventRef{constructor(event){this.stableId=event.stableId;this.titl...
    method constructor (line 2372) | constructor(event){this.stableId=event.stableId;this.title=event.title...
  class RelatedEventSet (line 2373) | class RelatedEventSet extends tr.v.d.Diagnostic{constructor(opt_events){...
    method constructor (line 2373) | constructor(opt_events){super();this.eventsByStableId_=new Map();this....
    method clone (line 2374) | clone(){const clone=new tr.v.d.CollectedRelatedEventSet();clone.addDia...
    method equals (line 2375) | equals(other){if(this.length!==other.length)return false;for(const eve...
    method add (line 2377) | add(event){this.eventsByStableId_.set(event.stableId,event);}
    method has (line 2378) | has(event){return this.eventsByStableId_.has(event.stableId);}
    method length (line 2379) | get length(){return this.eventsByStableId_.size;}
    method canonicalUrl (line 2380) | get canonicalUrl(){return this.canonicalUrl_;}
    method resolve (line 2381) | resolve(model,opt_required){for(const[stableId,value]of this.eventsByS...
    method serialize (line 2382) | serialize(serializer){return[...this].map(event=>[event.stableId,seria...
    method asDictInto_ (line 2383) | asDictInto_(d){d.events=[];for(const event of this){d.events.push({sta...
    method deserialize (line 2384) | static deserialize(data,deserializer){return new RelatedEventSet(data....
    method fromDict (line 2385) | static fromDict(d){return new RelatedEventSet(d.events.map(event=>new ...
  method [Symbol.iterator] (line 2379) | *[Symbol.iterator](){for(const event of this.eventsByStableId_.values())...
  class RelatedNameMap (line 2386) | class RelatedNameMap extends tr.v.d.Diagnostic{constructor(opt_info){sup...
    method constructor (line 2386) | constructor(opt_info){super();this.map_=new Map();if(opt_info){for(con...
    method clone (line 2387) | clone(){const clone=new RelatedNameMap();clone.addDiagnostic(this);ret...
    method equals (line 2388) | equals(other){if(!(other instanceof RelatedNameMap))return false;const...
    method canAddDiagnostic (line 2390) | canAddDiagnostic(otherDiagnostic){return otherDiagnostic instanceof Re...
    method addDiagnostic (line 2391) | addDiagnostic(otherDiagnostic){for(const[key,name]of otherDiagnostic){...
    method serialize (line 2392) | serialize(serializer){const keys=[...this.map_.keys()];keys.sort();con...
    method asDictInto_ (line 2393) | asDictInto_(d){d.names={};for(const[key,name]of this)d.names[key]=name;}
    method set (line 2394) | set(key,name){this.map_.set(key,name);}
    method get (line 2395) | get(key){return this.map_.get(key);}
    method values (line 2395) | *values(){for(const value of this.map_.values())yield value;}
    method fromEntries (line 2396) | static fromEntries(entries){const names=new RelatedNameMap();for(const...
    method deserialize (line 2398) | static deserialize(data,deserializer){const names=new RelatedNameMap()...
    method fromDict (line 2400) | static fromDict(d){return RelatedNameMap.fromEntries(Object.entries(d....
  method [Symbol.iterator] (line 2395) | *[Symbol.iterator](){for(const pair of this.map_)yield pair;}
  class Scalar (line 2401) | class Scalar extends tr.v.d.Diagnostic{constructor(value){super();if(!(v...
    method constructor (line 2267) | constructor(unit,value){if(!(unit instanceof tr.b.Unit)){throw new Err...
    method asDict (line 2270) | asDict(){return{unit:this.unit.asJSON(),value:tr.b.numberToJson(this.v...
    method toString (line 2271) | toString(){return this.unit.format(this.value);}
    method fromDict (line 2272) | static fromDict(d){return new Scalar(tr.b.Unit.fromJSON(d.unit),tr.b.n...
    method constructor (line 2401) | constructor(value){super();if(!(value instanceof tr.b.Scalar)){throw n...
    method clone (line 2403) | clone(){return new Scalar(this.value);}
    method serialize (line 2404) | serialize(serializer){return this.value.asDict();}
    method asDictInto_ (line 2405) | asDictInto_(d){d.value=this.value.asDict();}
    method deserialize (line 2406) | static deserialize(value,deserializer){return Scalar.fromDict({value});}
    method fromDict (line 2407) | static fromDict(d){return new Scalar(tr.b.Scalar.fromDict(d.value));}
  class UnmergeableDiagnosticSet (line 2408) | class UnmergeableDiagnosticSet extends tr.v.d.Diagnostic{constructor(dia...
    method constructor (line 2408) | constructor(diagnostics){super();this._diagnostics=diagnostics;}
    method clone (line 2409) | clone(){const clone=new tr.v.d.UnmergeableDiagnosticSet();clone.addDia...
    method canAddDiagnostic (line 2410) | canAddDiagnostic(otherDiagnostic){return true;}
    method addDiagnostic (line 2411) | addDiagnostic(otherDiagnostic){if(otherDiagnostic instanceof Unmergeab...
    method length (line 2415) | get length(){return this._diagnostics.length;}
    method asDictInto_ (line 2416) | asDictInto_(d){d.diagnostics=this._diagnostics.map(d=>d.asDictOrRefere...
    method deserialize (line 2417) | static deserialize(data,deserializer){return new UnmergeableDiagnostic...
    method serialize (line 2418) | serialize(serializer){return this._diagnostics.map(d=>serializer.getOr...
    method fromDict (line 2419) | static fromDict(d){return new UnmergeableDiagnosticSet(d.diagnostics.m...
  method [Symbol.iterator] (line 2415) | *[Symbol.iterator](){for(const diagnostic of this._diagnostics)yield dia...
  class DiagnosticMap (line 2422) | class DiagnosticMap extends Map{constructor(opt_allowReservedNames){supe...
    method constructor (line 2422) | constructor(opt_allowReservedNames){super();if(opt_allowReservedNames=...
    method set (line 2424) | set(name,diagnostic){if(typeof(name)!=='string'){throw new Error(`name...
    method delete (line 2428) | delete(name){if(name===undefined)throw new Error('missing name');Map.p...
    method deserializeAdd (line 2429) | deserializeAdd(data,deserializer){for(const id of data){const{name,dia...
    method addDicts (line 2430) | addDicts(dict){for(const[name,diagnosticDict]of Object.entries(dict)){...
    method resolveSharedDiagnostics (line 2431) | resolveSharedDiagnostics(histograms,opt_required){for(const[name,value...
    method serialize (line 2433) | serialize(serializer){const data=[];for(const[name,diagnostic]of this)...
    method asDict (line 2435) | asDict(){const dict={};for(const[name,diagnostic]of this){dict[name]=d...
    method deserialize (line 2437) | static deserialize(data,deserializer){const diagnostics=new Diagnostic...
    method fromDict (line 2438) | static fromDict(d){const diagnostics=new DiagnosticMap();diagnostics.a...
    method fromObject (line 2439) | static fromObject(obj){const diagnostics=new DiagnosticMap();if(!(obj ...
    method addDiagnostics (line 2441) | addDiagnostics(other){for(const[name,otherDiagnostic]of other){const m...
  function percentToString (line 2444) | function percentToString(percent,opt_force3){if(percent<0||percent>1){th...
  function percentFromString (line 2448) | function percentFromString(s){return parseFloat(s[0]+'.'+s.substr(1).rep...
  class HistogramBin (line 2449) | class HistogramBin{constructor(range){this.range=range;this.count=0;this...
    method constructor (line 2449) | constructor(range){this.range=range;this.count=0;this.diagnosticMaps=[];}
    method addSample (line 2450) | addSample(value){this.count+=1;}
    method addDiagnosticMap (line 2451) | addDiagnosticMap(diagnostics){tr.b.math.Statistics.uniformlySampleStre...
    method addBin (line 2452) | addBin(other){if(!this.range.equals(other.range)){throw new Error('Mer...
    method deserialize (line 2454) | deserialize(data,deserializer){if(!(data instanceof Array)){this.count...
    method fromDict (line 2456) | fromDict(dict){this.count=dict[0];if(dict.length>1){for(const map of d...
    method serialize (line 2457) | serialize(serializer){if(!this.diagnosticMaps.length){return this.count;}
    method asDict (line 2459) | asDict(){if(!this.diagnosticMaps.length){return[this.count];}
  class Histogram (line 2461) | class Histogram{constructor(name,unit,opt_binBoundaries){if(!(unit insta...
    method constructor (line 2461) | constructor(name,unit,opt_binBoundaries){if(!(unit instanceof tr.b.Uni...
    method create (line 2464) | static create(name,unit,samples,opt_options){const options=opt_options...
    method diagnostics (line 2470) | get diagnostics(){return this.diagnostics_;}
    method running (line 2471) | get running(){return this.running_;}
    method maxNumSampleValues (line 2472) | get maxNumSampleValues(){return this.maxNumSampleValues_;}
    method maxNumSampleValues (line 2473) | set maxNumSampleValues(n){this.maxNumSampleValues_=n;tr.b.math.Statist...
    method name (line 2474) | get name(){return this.name_;}
    method deserializeStatistics_ (line 2475) | deserializeStatistics_(){const statisticsNames=this.diagnostics.get(tr...
    method deserializeBin_ (line 2478) | deserializeBin_(i,bin,deserializer){this.allBins[i]=new HistogramBin(t...
    method deserializeBins_ (line 2480) | deserializeBins_(bins,deserializer){if(bins instanceof Array){for(let ...
    method deserialize (line 2481) | static deserialize(data,deserializer){const[name,unit,boundaries,diagn...
    method fromDict (line 2486) | static fromDict(dict){const hist=new Histogram(dict.name,tr.b.Unit.fro...
    method numValues (line 2498) | get numValues(){return this.running_?this.running_.count:0;}
    method average (line 2499) | get average(){return this.running_?this.running_.mean:undefined;}
    method standardDeviation (line 2500) | get standardDeviation(){return this.running_?this.running_.stddev:unde...
    method geometricMean (line 2501) | get geometricMean(){return this.running_?this.running_.geometricMean:0;}
    method sum (line 2502) | get sum(){return this.running_?this.running_.sum:0;}
    method min (line 2503) | get min(){return this.running_?this.running_.min:Infinity;}
    method max (line 2504) | get max(){return this.running_?this.running_.max:-Infinity;}
    method getDifferenceSignificance (line 2505) | getDifferenceSignificance(other,opt_alpha){if(this.unit!==other.unit){...
    method getApproximatePercentile (line 2509) | getApproximatePercentile(percent){if(percent<0||percent>1){throw new E...
    method getBinIndexForValue (line 2515) | getBinIndexForValue(value){const i=tr.b.findFirstTrueIndexInSortedArra...
    method getBinForValue (line 2516) | getBinForValue(value){return this.allBins[this.getBinIndexForValue(val...
    method addSample (line 2517) | addSample(value,opt_diagnostics){if(opt_diagnostics){if(!(opt_diagnost...
    method resampleMean_ (line 2523) | resampleMean_(percent){const filteredSamples=this.sampleValues_.filter...
    method sampleValuesInto (line 2528) | sampleValuesInto(samples){for(const sampleValue of this.sampleValues){...
    method canAddHistogram (line 2529) | canAddHistogram(other){if(this.unit!==other.unit){return false;}
    method addHistogram (line 2537) | addHistogram(other){if(!this.canAddHistogram(other)){throw new Error('...
    method customizeSummaryOptions (line 2546) | customizeSummaryOptions(summaryOptions){for(const[key,value]of Object....
    method getStatisticScalar (line 2547) | getStatisticScalar(statName,opt_referenceHistogram,opt_mwu){if(statNam...
    method statisticsNames (line 2567) | get statisticsNames(){const statisticsNames=new Set();for(const[statNa...
    method canCompare (line 2569) | canCompare(other){return other instanceof Histogram&&this.unit===other...
    method getAvailableStatisticName (line 2570) | getAvailableStatisticName(statName,opt_referenceHist){if(this.canCompa...
    method getDeltaStatisticsNames (line 2572) | static getDeltaStatisticsNames(statNames){const deltaNames=[];for(cons...
    method statisticsScalars (line 2574) | get statisticsScalars(){const results=new Map();for(const statName of ...
    method sampleValues (line 2576) | get sampleValues(){return this.sampleValues_;}
    method clone (line 2577) | clone(){const binBoundaries=HistogramBinBoundaries.fromDict(this.binBo...
    method rebin (line 2579) | rebin(newBoundaries){const rebinned=new tr.v.Histogram(this.name,this....
    method serialize (line 2583) | serialize(serializer){let nanBin=this.numNans;if(this.nanDiagnosticMap...
    method asDict (line 2585) | asDict(){const dict={};dict.name=this.name;dict.unit=this.unit.asJSON(...
    method serializeBins_ (line 2596) | serializeBins_(serializer){const numBins=this.allBins.length;let empty...
    method allBinsAsDict_ (line 2602) | allBinsAsDict_(){const numBins=this.allBins.length;let emptyBins=0;for...
    method defaultMaxNumSampleValues_ (line 2608) | get defaultMaxNumSampleValues_(){return DEFAULT_SAMPLE_VALUES_PER_BIN*...
  class HistogramBinBoundaries (line 2609) | class HistogramBinBoundaries{static createLinear(min,max,numBins){return...
    method createLinear (line 2609) | static createLinear(min,max,numBins){return new HistogramBinBoundaries...
    method createExponential (line 2610) | static createExponential(min,max,numBins){return new HistogramBinBound...
    method createWithBoundaries (line 2611) | static createWithBoundaries(binBoundaries){const builder=new Histogram...
    method constructor (line 2613) | constructor(minBinBoundary){this.builder_=[minBinBoundary];this.range_...
    method range (line 2614) | get range(){return this.range_;}
    method asDict (line 2615) | asDict(){if(this.builder_.length===1&&this.builder_[0]===Number.MAX_VA...
    method pushBuilderSlice_ (line 2617) | pushBuilderSlice_(slice){this.builder_.push(slice);this.builder_=this....
    method fromDict (line 2618) | static fromDict(dict){if(dict===undefined){return HistogramBinBoundari...
    method bins (line 2623) | get bins(){if(this.bins_===undefined){this.buildBins_();}
    method buildBins_ (line 2625) | buildBins_(){this.bins_=this.binRanges.map(r=>new HistogramBin(r));}
    method binRanges (line 2626) | get binRanges(){if(this.binRanges_===undefined){this.buildBinRanges_();}
    method buildBinRanges_ (line 2628) | buildBinRanges_(){if(typeof this.builder_[0]!=='number'){throw new Err...
    method addBinBoundary (line 2638) | addBinBoundary(nextMaxBinBoundary){if(nextMaxBinBoundary<=this.range.m...
    method addLinearBins (line 2640) | addLinearBins(nextMaxBinBoundary,binCount){if(binCount<=0){throw new E...
    method addExponentialBins (line 2643) | addExponentialBins(nextMaxBinBoundary,binCount){if(binCount<=0){throw ...
  function accessibilityMetric (line 2647) | function accessibilityMetric(histograms,model){const browserAccessibilit...
  function androidStartupMetric (line 2651) | function androidStartupMetric(histograms,model){let messageLoopStartEven...
  function findProcess (line 2666) | function findProcess(processName,model){for(const pid in model.processes...
  function findThreads (line 2668) | function findThreads(process,threadPrefix){if(process===undefined)return...
  function findUIThread (line 2670) | function findUIThread(process){if(process===undefined)return undefined;c...
  function findLaunchSlices (line 2672) | function findLaunchSlices(model){const launches=[];const binders=findThr...
  function findDrawSlice (line 2674) | function findDrawSlice(appName,startNotBefore,model){let drawSlice=undef...
  function findInputEventSlice (line 2676) | function findInputEventSlice(endNotAfter,model){const endNotBefore=endNo...
  function computeStartupTimeInMs (line 2678) | function computeStartupTimeInMs(appName,launchSlice,model){let startupSt...
  function measureStartup (line 2681) | function measureStartup(histograms,model){const launches=findLaunchSlice...
  function measureThreadStates (line 2682) | function measureThreadStates(histograms,model,rangeOfInterest){for(const...
  function androidSystraceMetric (line 2684) | function androidSystraceMetric(histograms,model,options){let rangeOfInte...
  function PiecewiseLinearFunction (line 2686) | function PiecewiseLinearFunction(){this.pieces=[];}
  method push (line 2687) | push(x1,y1,x2,y2){if(x1>=x2){throw new Error('Invalid segment');}
  method partBelow (line 2689) | partBelow(y){return this.pieces.reduce((acc,p)=>(acc+p.partBelow(y)),0);}
  method min (line 2689) | get min(){return this.pieces.reduce((acc,p)=>Math.min(acc,p.min),Infinit...
  method max (line 2689) | get max(){return this.pieces.reduce((acc,p)=>Math.max(acc,p.max),-Infini...
  method average (line 2689) | get average(){let weightedSum=0;let totalWeight=0;this.pieces.forEach(fu...
  method percentile (line 2689) | percentile(percent){if(!(percent>=0&&percent<=1)){throw new Error('perce...
  function Piece (line 2691) | function Piece(x1,y1,x2,y2){this.x1=x1;this.y1=y1;this.x2=x2;this.y2=y2;}
  method partBelow (line 2692) | partBelow(y){const width=this.width;if(width===0)return 0;const minY=thi...
  method min (line 2692) | get min(){return Math.min(this.y1,this.y2);}
  method max (line 2692) | get max(){return Math.max(this.y1,this.y2);}
  method average (line 2692) | get average(){return(this.y1+this.y2)/2;}
  method width (line 2692) | get width(){return this.x2-this.x1;}
  function Slice (line 2692) | function Slice(category,title,colorId,start,args,opt_duration,opt_cpuSta...
  method analysisTypeName (line 2697) | get analysisTypeName(){return this.title;}
  method userFriendlyName (line 2697) | get userFriendlyName(){return'Slice '+this.title+' at '+
  method stableId (line 2698) | get stableId(){const parentSliceGroup=this.parentContainer.sliceGroup;re...
  method bindId (line 2699) | get bindId(){return this.bind_id_;}
  method findDescendentSlice (line 2699) | findDescendentSlice(targetTitle){if(!this.subSlices){return undefined;}
  method mostTopLevelSlice (line 2702) | get mostTopLevelSlice(){if(!this.parentSlice)return this;return this.par...
  method getProcess (line 2702) | getProcess(){const thread=this.parentContainer;if(thread&&thread.getProc...
  method model (line 2703) | get model(){const process=this.getProcess();if(process!==undefined){retu...
  method findTopmostSlicesRelativeToThisSlice (line 2704) | *findTopmostSlicesRelativeToThisSlice(eventPredicate){if(eventPredicate(...
  method iterateAllSubsequentSlices (line 2705) | iterateAllSubsequentSlices(callback,opt_this){const parentStack=[];let s...
  method subsequentSlices (line 2706) | get subsequentSlices(){const res=[];this.iterateAllSubsequentSlices(func...
  method enumerateAllAncestors (line 2706) | *enumerateAllAncestors(){let curSlice=this.parentSlice;while(curSlice){y...
  method ancestorSlices (line 2706) | get ancestorSlices(){return Array.from(this.enumerateAllAncestors());}
  method iterateEntireHierarchy (line 2706) | iterateEntireHierarchy(callback,opt_this){const mostTopLevelSlice=this.m...
  method entireHierarchy (line 2706) | get entireHierarchy(){const res=[];this.iterateEntireHierarchy(function(...
  method ancestorAndSubsequentSlices (line 2706) | get ancestorAndSubsequentSlices(){const res=[];res.push(this);for(const ...
  method enumerateAllDescendents (line 2707) | *enumerateAllDescendents(){for(const slice of this.subSlices){yield slice;}
  method descendentSlices (line 2708) | get descendentSlices(){const res=[];for(const slice of this.enumerateAll...
  function ThreadSlice (line 2709) | function ThreadSlice(cat,title,colorId,start,args,opt_duration,opt_cpuSt...
  method overlappingSamples (line 2710) | get overlappingSamples(){const samples=new tr.model.EventSet();if(!this....
  function V8ThreadSlice (line 2711) | function V8ThreadSlice(){ThreadSlice.apply(this,arguments);this.runtimeC...
  method runtimeCallStats (line 2712) | get runtimeCallStats(){if('runtime-call-stats'in this.args){this.runtime...
  function findParent (line 2713) | function findParent(event,predicate){let parent=event.parentSlice;while(...
  function isIdleTask (line 2716) | function isIdleTask(event){return event.title===IDLE_TASK_EVENT;}
  function isLowMemoryEvent (line 2717) | function isLowMemoryEvent(event){return event.title===LOW_MEMORY_EVENT;}
  function isV8Event (line 2718) | function isV8Event(event){return event.title.startsWith('V8.');}
  function isV8ExecuteEvent (line 2719) | function isV8ExecuteEvent(event){return event.title===V8_EXECUTE;}
  function isTopV8ExecuteEvent (line 2720) | function isTopV8ExecuteEvent(event){return isV8ExecuteEvent(event)&&find...
  function isGarbageCollectionEvent (line 2721) | function isGarbageCollectionEvent(event){return event.title&&event.title...
  function isTopGarbageCollectionEvent (line 2722) | function isTopGarbageCollectionEvent(event){return event.title in TOP_GC...
  function isForcedGarbageCollectionEvent (line 2723) | function isForcedGarbageCollectionEvent(event){return findParent(event,i...
  function isSubGarbageCollectionEvent (line 2724) | function isSubGarbageCollectionEvent(event){return isGarbageCollectionEv...
  function isNotForcedTopGarbageCollectionEvent (line 2725) | function isNotForcedTopGarbageCollectionEvent(event){return tr.metrics.v...
  function isNotForcedSubGarbageCollectionEvent (line 2726) | function isNotForcedSubGarbageC
Copy disabled (too large) Download .json
Condensed preview — 164 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (32,670K chars).
[
  {
    "path": ".coveragerc",
    "chars": 103,
    "preview": "[run]\ncover_pylib = True\nsource = viztracer\npatch = subprocess\nomit =\n    */viztracer/attach_process/*\n"
  },
  {
    "path": ".gitattributes",
    "chars": 168,
    "preview": "src/viztracer/html/** linguist-vendored\nexample/json/* linguist-generated\nsrc/viztracer/web_dist/** linguist-vendored\nsr"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "chars": 2783,
    "preview": "\nFirst of all, many thanks to everyone who wants to contribute to VizTracer!\n\n## Before Writing Code\n\nIf you have any th"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 23,
    "preview": "github: gaogaotiantian\n"
  },
  {
    "path": ".github/workflows/docs.yml",
    "chars": 573,
    "preview": "name: docs\n\non:\n  push:\n    branches: [ master ]\n    paths:\n      - \"docs/**\"\n      - \".github/workflows/docs.yml\"\n  pul"
  },
  {
    "path": ".github/workflows/lint.yml",
    "chars": 657,
    "preview": "name: lint\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n\njobs:\n  lint:\n    strategy:\n      matrix:\n        pyth"
  },
  {
    "path": ".github/workflows/python-package.yml",
    "chars": 3732,
    "preview": "# This workflow will install Python dependencies, run tests and lint with a variety of Python versions\n# For more inform"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 1049,
    "preview": "name: Python package build and publish\n\non:\n  release:\n    types: [created]\n\njobs:\n  build-wheels:\n    uses: ./.github/w"
  },
  {
    "path": ".github/workflows/wheels.yml",
    "chars": 3651,
    "preview": "name: wheels\n\non:\n  push:\n    branches: [ master ]\n    paths:\n      - \"src/viztracer/**\"\n      - \"setup.py\"\n      - \".gi"
  },
  {
    "path": ".gitignore",
    "chars": 1835,
    "preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
  },
  {
    "path": ".readthedocs.yml",
    "chars": 644,
    "preview": "# .readthedocs.yml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html fo"
  },
  {
    "path": "CITATION.cff",
    "chars": 459,
    "preview": "cff-version: 1.2.0\ntitle: >-\n  VizTracer - A debugging and profiling tool that can trace\n  and visualize python code exe"
  },
  {
    "path": "LICENSE",
    "chars": 11935,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "MANIFEST.in",
    "chars": 262,
    "preview": "include LICENSE\ninclude NOTICE.txt\ninclude README.md\ninclude setup.py\n\nrecursive-include src/viztracer/html *.css *.js\nr"
  },
  {
    "path": "Makefile",
    "chars": 636,
    "preview": ".PHONY: refresh build install build_dist json release lint test clean\n\nrefresh: clean build install lint\n\nbuild:\n\tpython"
  },
  {
    "path": "NOTICE.txt",
    "chars": 1031,
    "preview": "VizTracer\nCopyright 2020-2025 Tian Gao\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use "
  },
  {
    "path": "README.md",
    "chars": 12189,
    "preview": "# VizTracer\n\n[![build](https://github.com/gaogaotiantian/viztracer/workflows/build/badge.svg)](https://github.com/gaogao"
  },
  {
    "path": "docs/Makefile",
    "chars": 638,
    "preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
  },
  {
    "path": "docs/make.bat",
    "chars": 799,
    "preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
  },
  {
    "path": "docs/requirements.txt",
    "chars": 37,
    "preview": "Sphinx==7.2.6\nsphinx-rtd-theme==1.3.0"
  },
  {
    "path": "docs/source/basic_usage.rst",
    "chars": 8917,
    "preview": "Basic Usage\n===========\n\nCommand Line\n------------\n\nThe easiest way to use VizTracer is through command line. Assume you"
  },
  {
    "path": "docs/source/concurrency.rst",
    "chars": 4931,
    "preview": "Concurrency\n===========\n\nVizTracer supports concurrency tracing, including asyncio, multi-thread and multi-process. \n\nas"
  },
  {
    "path": "docs/source/conf.py",
    "chars": 2292,
    "preview": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common op"
  },
  {
    "path": "docs/source/contact.rst",
    "chars": 164,
    "preview": "Contact Us\n==========\n\nIf you have any questions, bug reports or feature requests, please go to `github issue <https://g"
  },
  {
    "path": "docs/source/custom_event.rst",
    "chars": 4264,
    "preview": "Custom Event\n============\n\n``_EventBase`` is the base class of ``VizCounter`` and ``VizObject``. It should never be used"
  },
  {
    "path": "docs/source/custom_event_intro.rst",
    "chars": 2968,
    "preview": "Custom Events\n=============\n\nYou may want to insert custom events to the report while you are tracing the program. \n\nViz"
  },
  {
    "path": "docs/source/decorator.rst",
    "chars": 2958,
    "preview": "Decorator\n=========\n\n.. py:decorator:: ignore_function\n\n    ``@ignore_function`` can tell VizTracer to skip on functions"
  },
  {
    "path": "docs/source/extra_log.rst",
    "chars": 7957,
    "preview": "Extra Log\n=========\n\nVizTracer features with many extra log possibilities **without even changing your source code**. \nY"
  },
  {
    "path": "docs/source/filter.rst",
    "chars": 4865,
    "preview": "Filter\n======\n\nSometimes, you may have too many data entries and you want to filter some of them out to either improve t"
  },
  {
    "path": "docs/source/global_tracer.rst",
    "chars": 1470,
    "preview": "Global Tracer Object\n====================\n\nSome features in VizTracer require a ``VizTracer`` object so it's helpful to "
  },
  {
    "path": "docs/source/index.rst",
    "chars": 1188,
    "preview": ".. VizTracer documentation master file, created by\n   sphinx-quickstart on Sun Aug 23 11:51:08 2020.\n   You can adapt th"
  },
  {
    "path": "docs/source/installation.rst",
    "chars": 736,
    "preview": "Installation\n============\n\nVizTracer works with python 3.9+ on Linux/MacOs/Windows. No other dependency. For now, VizTra"
  },
  {
    "path": "docs/source/license.rst",
    "chars": 571,
    "preview": "License\n=======\n\nCopyright 2020-2024 Tian Gao\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may n"
  },
  {
    "path": "docs/source/limitations.rst",
    "chars": 1173,
    "preview": "Limitations\n===========\n\nVizTracer uses ``sys.setprofile()`` (before Python3.12) and ``sys.monitoring`` (after Python3.1"
  },
  {
    "path": "docs/source/plugins.rst",
    "chars": 1459,
    "preview": "Plugins\n=======\n\nVizTracer supports third party plugins that comply to the specification of VizTracer.\n\nTo use a plugin,"
  },
  {
    "path": "docs/source/remote_attach.rst",
    "chars": 3075,
    "preview": "Remote Attach\n=============\n\nAttach\n------\n\nVizTracer supports remote attach so you don't need to start the process with"
  },
  {
    "path": "docs/source/sponsor.rst",
    "chars": 542,
    "preview": "Sponsor\n=======\n\nIf you find VizTracer useful and would like to support its development, please consider\n`sponsoring <ht"
  },
  {
    "path": "docs/source/viz_plugin.rst",
    "chars": 4270,
    "preview": "VizPlugin\n=========\n\nIn this doc, we will show how to build your own plugin for VizTracer.\n\nEvery plugin should inherit "
  },
  {
    "path": "docs/source/viztracer.rst",
    "chars": 13508,
    "preview": "VizTracer\n=========\n\n.. py:class:: VizTracer(self,\\\n                 tracer_entries=1000000,\\\n                 verbose=1"
  },
  {
    "path": "example/generate_examples.py",
    "chars": 1064,
    "preview": "import os\nimport subprocess\n\n\ndef generate_by_script(script):\n    file_path = os.path.join(os.path.dirname(__file__), \"s"
  },
  {
    "path": "example/json/async_simple.json",
    "chars": 771576,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222311, \"tid\": 222311, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/different_sorts.json",
    "chars": 3262370,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222321, \"tid\": 222321, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/function_args_return.json",
    "chars": 7427,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222294, \"tid\": 222294, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/gradient_descent.json",
    "chars": 4839311,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222296, \"tid\": 222296, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/logging_integration.json",
    "chars": 15306,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222316, \"tid\": 222316, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/mcts_game.json",
    "chars": 6829493,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222292, \"tid\": 222292, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/json/multi_process_pool.json",
    "chars": 2548608,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222288, \"tid\": 222288, \"name\": \"process_name\", \"args\": {\"name\": \"ForkPoolWorker-5\"}}"
  },
  {
    "path": "example/json/multithread.json",
    "chars": 168343,
    "preview": "{\"traceEvents\": [{\"ph\": \"M\", \"pid\": 222323, \"tid\": 222323, \"name\": \"process_name\", \"args\": {\"name\": \"MainProcess\"}}, {\"p"
  },
  {
    "path": "example/requirements.txt",
    "chars": 10,
    "preview": "numpy\nmcts"
  },
  {
    "path": "example/src/async_simple.py",
    "chars": 301,
    "preview": "import asyncio\n\n\nasync def io_task():\n    await asyncio.sleep(0.01)\n\n\nasync def main():\n    t1 = asyncio.create_task(io_"
  },
  {
    "path": "example/src/different_sorts.py",
    "chars": 3500,
    "preview": "# https://github.com/TheAlgorithms/Python\n\n\nimport os\nimport random\n\nfrom viztracer import VizTracer\n\n\ndef merge_sort(co"
  },
  {
    "path": "example/src/function_args_return.py",
    "chars": 337,
    "preview": "import os\n\nfrom viztracer import VizTracer\n\n\ndef fib(n):\n    if n < 2:\n        return 1\n    return fib(n - 1) + fib(n - "
  },
  {
    "path": "example/src/gradient_descent.py",
    "chars": 4685,
    "preview": "# https://github.com/TheAlgorithms/Python\n\nimport math\nimport os\n\nimport numpy\n\nfrom viztracer import VizTracer\nfrom viz"
  },
  {
    "path": "example/src/logging_integration.py",
    "chars": 406,
    "preview": "import logging\n\nfrom viztracer import get_tracer\nfrom viztracer.vizlogging import VizLoggingHandler\n\n\ndef fib(n):\n    if"
  },
  {
    "path": "example/src/mcts_game.py",
    "chars": 2608,
    "preview": "from __future__ import division\n\nimport operator\nfrom copy import deepcopy\nfrom functools import reduce\n\nfrom mcts impor"
  },
  {
    "path": "example/src/multi_process_pool.py",
    "chars": 699,
    "preview": "import os\nfrom multiprocessing import Pool\n\n\ndef f(x):\n    return x**x\n\n\nif __name__ == \"__main__\":\n    process_num = 5\n"
  },
  {
    "path": "example/src/multithread.py",
    "chars": 666,
    "preview": "import os\nimport threading\nimport time\n\nfrom viztracer import VizTracer\n\n\ndef fib(n):\n    if n < 2:\n        return 1\n   "
  },
  {
    "path": "pyproject.toml",
    "chars": 1664,
    "preview": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"viztracer\"\nauthors ="
  },
  {
    "path": "requirements-dev.txt",
    "chars": 302,
    "preview": "# Build Packages\nbuild\nsetuptools\nwheel\n\n# Lint & Coverage\nruff\nmypy\ncoverage\n\n# Test\npytest\ncoredumpy\n\n# Devtools\npysta"
  },
  {
    "path": "setup.py",
    "chars": 2437,
    "preview": "import platform\nimport sys\n\nimport setuptools\n\n# Determine which attach binary to take into package\npackage_data = {\n   "
  },
  {
    "path": "src/viztracer/__init__.py",
    "chars": 507,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/__main__.py",
    "chars": 225,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/attach.py",
    "chars": 2005,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/attach_process/LICENSE",
    "chars": 11513,
    "preview": "Eclipse Public License - v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC\nLICENSE (\"AG"
  },
  {
    "path": "src/viztracer/attach_process/README.txt",
    "chars": 185,
    "preview": "This folder is copied from https://github.com/fabioz/PyDev.Debugger\n\nSome print code in add_code_to_python_process.py is"
  },
  {
    "path": "src/viztracer/attach_process/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "src/viztracer/attach_process/add_code_to_python_process.py",
    "chars": 20599,
    "preview": "# type: ignore\n\nr'''\nCopyright: Brainwy Software Ltda.\n\nLicense: EPL.\n=============\n\nWorks for Windows by using an execu"
  },
  {
    "path": "src/viztracer/attach_process/linux_and_mac/lldb_prepare.py",
    "chars": 1691,
    "preview": "# This file is meant to be run inside lldb\n# It registers command to load library and invoke attach function\n# Also it m"
  },
  {
    "path": "src/viztracer/cellmagic.py",
    "chars": 3730,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/code_monkey.py",
    "chars": 16552,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/decorator.py",
    "chars": 5709,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/event_base.py",
    "chars": 3222,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/functree.py",
    "chars": 5233,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/html/LICENSE",
    "chars": 1562,
    "preview": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms"
  },
  {
    "path": "src/viztracer/html/README.md",
    "chars": 116,
    "preview": "trace_viewer_embedder.html and trace_viewer_full.html are derived from\nhttps://github.com/catapult-project/catapult/"
  },
  {
    "path": "src/viztracer/html/flamegraph.html",
    "chars": 1663,
    "preview": "<head>\n  <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/d3-flame-graph@3.1.1/dist/d3-flamegraph.css\">\n  <link"
  },
  {
    "path": "src/viztracer/html/trace_viewer_embedder.html",
    "chars": 6734,
    "preview": "<!DOCTYPE html>\n<!--\nCopyright (c) 2014 The Chromium Authors. All rights reserved.\nUse of this source code is governed b"
  },
  {
    "path": "src/viztracer/html/trace_viewer_full.html",
    "chars": 2598313,
    "preview": "<!DOCTYPE html>\n<!--\nCopyright (c) 2014 The Chromium Authors. All rights reserved.\nUse of this source code is governed b"
  },
  {
    "path": "src/viztracer/main.py",
    "chars": 33847,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/modules/eventnode.c",
    "chars": 6538,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/eventnode.h",
    "chars": 1541,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/pythoncapi_compat.h",
    "chars": 46185,
    "preview": "// Header file providing new C API functions to old Python versions.\n//\n// File distributed under the Zero Clause BSD (0"
  },
  {
    "path": "src/viztracer/modules/quicktime.c",
    "chars": 4102,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/quicktime.h",
    "chars": 2354,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/snaptrace.c",
    "chars": 71051,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/snaptrace.h",
    "chars": 4016,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/snaptrace_member.c",
    "chars": 13757,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/util.c",
    "chars": 1303,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/util.h",
    "chars": 586,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/vcompressor/README.md",
    "chars": 1621,
    "preview": "# VizTracer log compressor/decompressor\n\n## Format\n\n### Data Type\n\n#### header\n\nA one-byte header indicating the followi"
  },
  {
    "path": "src/viztracer/modules/vcompressor/vc_dump.c",
    "chars": 39337,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/vcompressor/vc_dump.h",
    "chars": 1421,
    "preview": "#ifndef __VC_DUMP_H__\n#define __VC_DUMP_H__\n\n#include <Python.h>\n\n#define VC_HEADER_RESERVED 0x00\n#define VC_HEADER_FEE "
  },
  {
    "path": "src/viztracer/modules/vcompressor/vcompressor.c",
    "chars": 12664,
    "preview": "// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n// For details: https://github.com/gaog"
  },
  {
    "path": "src/viztracer/modules/vcompressor/vcompressor.h",
    "chars": 230,
    "preview": "#ifndef __VCOMPRESSOR_H__\n#define __VCOMPRESSOR_H__\n\n#include <Python.h>\n\n#define VCOMPRESSOR_VERSION 1\n\ntypedef struct "
  },
  {
    "path": "src/viztracer/patch.py",
    "chars": 14486,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/report_builder.py",
    "chars": 15153,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/report_server.py",
    "chars": 6990,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/snaptrace.pyi",
    "chars": 1648,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/util.py",
    "chars": 6605,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vcompressor.pyi",
    "chars": 302,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/viewer.py",
    "chars": 19809,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vizcounter.py",
    "chars": 793,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vizevent.py",
    "chars": 985,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vizlogging.py",
    "chars": 668,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vizobject.py",
    "chars": 1442,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/vizplugin.py",
    "chars": 5571,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/viztracer.py",
    "chars": 25020,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "src/viztracer/web_dist/LICENSE",
    "chars": 10689,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "src/viztracer/web_dist/index.html",
    "chars": 5790,
    "preview": "<!doctype html>\n<html lang=\"en-us\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Perfetto UI</title>\n  <meta content=\"width="
  },
  {
    "path": "src/viztracer/web_dist/service_worker.js",
    "chars": 12645,
    "preview": "var service_worker = (function () {\n'use strict';\n\nvar service_worker = {};\n\n// Copyright (C) 2020 The Android Open Sour"
  },
  {
    "path": "src/viztracer/web_dist/trace_processor",
    "chars": 9969,
    "preview": "#!/usr/bin/env python3\n# Copyright (C) 2021 The Android Open Source Project\n#\n# Licensed under the Apache License, Versi"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/assets/catapult_trace_viewer.html",
    "chars": 141182,
    "preview": "<!DOCTYPE html>\n<html>\n  <head i18n-values=\"dir:textdirection;\">\n  <!-- WebComponents V0 origin trial token for https://"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/assets/catapult_trace_viewer.js",
    "chars": 2723530,
    "preview": "\n// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style lice"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/engine_bundle.js",
    "chars": 149562,
    "preview": "var engine=function(){\"use strict\";function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/frontend_bundle.js",
    "chars": 4521358,
    "preview": "var frontend=function(){\"use strict\";var ve=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/index.html",
    "chars": 5788,
    "preview": "<!doctype html>\n<html lang=\"en-us\">\n<head>\n  <meta charset=\"utf-8\">\n  <title>Perfetto UI</title>\n  <meta content=\"width="
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/manifest.json",
    "chars": 4196,
    "preview": "{\n  \"resources\": {\n    \"assets/MaterialSymbolsOutlined.woff2\": \"sha256-+wJwsRRT+mS8qIFxOCzr9+SL0N+L6U0lLJSLl1Bfbm8=\",\n  "
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/perfetto.css",
    "chars": 140268,
    "preview": "@charset \"UTF-8\";\n/* latin */\n@font-face {\n  font-family: \"Roboto\";\n  font-style: normal;\n  font-weight: 100;\n  src: url"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/stdlib_docs.json",
    "chars": 507808,
    "preview": "[{\"name\": \"android\", \"modules\": [{\"module_name\": \"android.app_process_starts\", \"data_objects\": [{\"name\": \"android_app_pr"
  },
  {
    "path": "src/viztracer/web_dist/v52.0-6b9586def/traceconv_bundle.js",
    "chars": 82747,
    "preview": "var traceconv=function(){\"use strict\";function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"defa"
  },
  {
    "path": "tests/__init__.py",
    "chars": 404,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/base_tmpl.py",
    "chars": 4152,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/cmdline_tmpl.py",
    "chars": 8210,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/data/fib.py",
    "chars": 78,
    "preview": "def fib(n):\n    if n < 2:\n        return 1\n    return fib(n - 1) + fib(n - 2)\n"
  },
  {
    "path": "tests/data/vdb_basic.py",
    "chars": 509,
    "preview": "from viztracer import VizTracer\nfrom viztracer.vizcounter import VizCounter\nfrom viztracer.vizobject import VizObject\n\n\n"
  },
  {
    "path": "tests/data/vdb_multithread.py",
    "chars": 699,
    "preview": "import threading\nimport time\n\nfrom viztracer import VizTracer, ignore_function\n\n\n@ignore_function\ndef ig(n):\n    if n < "
  },
  {
    "path": "tests/modules/__init__.py",
    "chars": 162,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/modules/dummy_vizplugin.py",
    "chars": 357,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/modules/dummy_vizplugin_wrong.py",
    "chars": 277,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/modules/issue160.py",
    "chars": 100,
    "preview": "import subprocess\nimport sys\n\nsubprocess.run([sys.executable, \"-u\", \"-c\", \"lst=[]; lst.append(1)\"])\n"
  },
  {
    "path": "tests/modules/issue58.py",
    "chars": 646,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/modules/issue83.py",
    "chars": 16,
    "preview": "print(__name__)\n"
  },
  {
    "path": "tests/package_env.py",
    "chars": 4012,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_basic.py",
    "chars": 12458,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_cmdline.py",
    "chars": 31742,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_codemonkey.py",
    "chars": 4468,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_fastlog.py",
    "chars": 1164,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_functree.py",
    "chars": 2150,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_invalid.py",
    "chars": 2551,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_jupyter.py",
    "chars": 795,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_logging.py",
    "chars": 1088,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_logsparse.py",
    "chars": 7397,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_multiprocess.py",
    "chars": 27104,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_multithread.py",
    "chars": 5829,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_patch.py",
    "chars": 7616,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_performance.py",
    "chars": 8079,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_regression.py",
    "chars": 17484,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_remote.py",
    "chars": 13190,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_report_builder.py",
    "chars": 7700,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_report_server.py",
    "chars": 6617,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_torch.py",
    "chars": 4913,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_tracer.py",
    "chars": 7099,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_util.py",
    "chars": 2141,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_vcompressor.py",
    "chars": 26540,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_viewer.py",
    "chars": 19324,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_vizcounter.py",
    "chars": 1628,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_vizevent.py",
    "chars": 522,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_vizobject.py",
    "chars": 3723,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/test_vizplugin.py",
    "chars": 3132,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  },
  {
    "path": "tests/util.py",
    "chars": 2477,
    "preview": "# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/gaogao"
  }
]

// ... and 4 more files (download for full content)

About this extraction

This page contains the full source code of the gaogaotiantian/viztracer GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 164 files (60.8 MB), approximately 7.5M tokens, and a symbol index with 9108 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!