py2docfx 0.1.16.dev2064350__py3-none-any.whl → 0.1.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/convert_prepare/environment.py +1 -3
- py2docfx/convert_prepare/get_source.py +1 -6
- py2docfx/convert_prepare/package_info.py +1 -1
- py2docfx/docfx_yaml/miss_reference.py +1 -1
- py2docfx/docfx_yaml/parameter_utils.py +58 -6
- py2docfx/docfx_yaml/tests/roots/test-translator-typing/code_with_typing.py +14 -0
- py2docfx/docfx_yaml/tests/roots/test-translator-typing/conf.py +18 -0
- py2docfx/docfx_yaml/tests/test_translator_typing.py +39 -0
- py2docfx/docfx_yaml/utils.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/certifi/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/certifi/core.py +1 -32
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/constant.py +17 -0
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/legacy.py +1 -3
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/md.py +19 -14
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/utils.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_elffile.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_manylinux.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_parser.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_tokenizer.py +5 -4
- py2docfx/venv/basevenv/Lib/site-packages/packaging/licenses/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/packaging/markers.py +53 -22
- py2docfx/venv/basevenv/Lib/site-packages/packaging/metadata.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/specifiers.py +1 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/tags.py +39 -0
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/__init__.py +6 -7
- py2docfx/venv/basevenv/Lib/site-packages/pygments/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/_sql_builtins.py +106 -0
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/scripting.py +5 -3
- py2docfx/venv/basevenv/Lib/site-packages/pygments/lexers/sql.py +24 -118
- py2docfx/venv/basevenv/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/requests/compat.py +12 -0
- py2docfx/venv/basevenv/Lib/site-packages/requests/models.py +3 -1
- py2docfx/venv/basevenv/Lib/site-packages/requests/utils.py +6 -16
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/__init__.py +0 -38
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_discovery.py +33 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_entry_points.py +4 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_normalization.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_path.py +12 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_reqs.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_scripts.py +361 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_shutil.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/build_meta.py +25 -37
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_ext.py +29 -28
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/develop.py +39 -179
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/egg_info.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +3 -55
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/sdist.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/compat/py310.py +11 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/dist.py +10 -12
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/installer.py +34 -29
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/contexts.py +0 -14
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/wheel.py +49 -24
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/__init__.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/arabic_stemmer.py +798 -797
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/armenian_stemmer.py +212 -213
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basestemmer.py +20 -54
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/basque_stemmer.py +202 -228
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/catalan_stemmer.py +370 -375
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/danish_stemmer.py +63 -61
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_porter_stemmer.py +466 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/dutch_stemmer.py +1217 -343
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/english_stemmer.py +295 -264
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/esperanto_stemmer.py +588 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/estonian_stemmer.py +850 -0
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/finnish_stemmer.py +144 -143
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/french_stemmer.py +308 -246
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/german_stemmer.py +224 -167
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/greek_stemmer.py +1314 -1313
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hindi_stemmer.py +39 -38
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/hungarian_stemmer.py +231 -256
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/indonesian_stemmer.py +61 -64
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/irish_stemmer.py +101 -106
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/italian_stemmer.py +272 -272
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/lithuanian_stemmer.py +233 -240
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/nepali_stemmer.py +108 -134
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/norwegian_stemmer.py +108 -63
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/porter_stemmer.py +101 -108
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/portuguese_stemmer.py +241 -250
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/romanian_stemmer.py +332 -296
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/russian_stemmer.py +178 -179
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/serbian_stemmer.py +2331 -2332
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/spanish_stemmer.py +254 -259
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/swedish_stemmer.py +143 -70
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/tamil_stemmer.py +638 -1491
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/turkish_stemmer.py +326 -292
- py2docfx/venv/basevenv/Lib/site-packages/snowballstemmer/yiddish_stemmer.py +245 -246
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/_version.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/connection.py +87 -38
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/poolmanager.py +17 -1
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/response.py +53 -24
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/request.py +12 -4
- py2docfx/venv/basevenv/Lib/site-packages/urllib3/util/ssl_.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base_async.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_aiohttp.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_base_async.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_asyncio.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_aiohttp.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_requests_asyncio.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/opentelemetry.py +13 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared_async.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_utils.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_constants.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/default.py +23 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/environment.py +12 -16
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/service_fabric.py +22 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/user_password.py +10 -6
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/vscode.py +13 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/auth_code_redirect_handler.py +3 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_internal/msal_client.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_persistent_cache.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azd_cli.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_cli.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/azure_powershell.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/chained.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/default.py +22 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/environment.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/service_fabric.py +17 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/vscode.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/certifi/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/certifi/core.py +1 -32
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/cli/__main__.py +62 -2
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/constant.py +17 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/legacy.py +1 -3
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/md.py +19 -14
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/utils.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/charset_normalizer/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__about__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/fernet.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/_oid.py +35 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/backends/openssl/backend.py +33 -10
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +14 -5
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +3 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +49 -45
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +2 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +10 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +8 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +6 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +9 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +7 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +79 -12
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +9 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/bindings/openssl/binding.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +5 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +4 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/_serialization.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +47 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +16 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +14 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +14 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +14 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +6 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/base.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +18 -18
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/hashes.py +5 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +7 -4
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/padding.py +7 -121
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +21 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +48 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +68 -18
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/cryptography/utils.py +15 -3
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/__init__.py +3 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/base.py +39 -6
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/extensions.py +100 -49
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/name.py +27 -15
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/ocsp.py +60 -25
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/oid.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/cryptography/x509/verification.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/bidi.py +17 -4
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/client_info.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/gapic_v1/client_info.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_base.py +13 -4
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_streaming_async.py +8 -5
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/retry/retry_unary_async.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/_default.py +2 -36
- py2docfx/venv/venv1/Lib/site-packages/google/auth/_helpers.py +240 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/_helpers.py +62 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/aio/transport/aiohttp.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/_metadata.py +5 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/credentials.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/identity_pool.py +91 -2
- py2docfx/venv/venv1/Lib/site-packages/google/auth/impersonated_credentials.py +75 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/__init__.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_aiohttp_requests.py +8 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_http_client.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/requests.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/urllib3.py +15 -5
- py2docfx/venv/venv1/Lib/site-packages/google/auth/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/id_token.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/webauthn_types.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any.py +15 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor.py +15 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +258 -113
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pool.py +22 -8
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/decoder.py +106 -23
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/field_mask.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_edition_defaults.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_message.py +21 -18
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/testing_refleaks.py +8 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/well_known_types.py +60 -43
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/json_format.py +4 -5
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/message_factory.py +16 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/text_format.py +11 -7
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.py +29 -23
- py2docfx/venv/venv1/Lib/site-packages/google/rpc/error_details_pb2.pyi +41 -2
- py2docfx/venv/venv1/Lib/site-packages/msal/application.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/msal/individual_cache.py +9 -5
- py2docfx/venv/venv1/Lib/site-packages/msal/managed_identity.py +4 -5
- py2docfx/venv/venv1/Lib/site-packages/msal/sku.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/msal/throttled_http_client.py +58 -30
- py2docfx/venv/venv1/Lib/site-packages/opencensus/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/__init__.py +138 -138
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/exporter.py +93 -93
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/processor.py +63 -63
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/protocol.py +206 -206
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/storage.py +205 -205
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/transport.py +355 -355
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/utils.py +79 -79
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/common/version.py +15 -15
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/log_exporter/__init__.py +314 -314
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/__init__.py +190 -190
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/__init__.py +62 -62
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/cpu.py +50 -50
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/http_requests.py +176 -176
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/memory.py +42 -42
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/metrics_exporter/standard_metrics/process.py +87 -87
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/state.py +50 -50
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat.py +100 -100
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/statsbeat/statsbeat_metrics.py +480 -480
- py2docfx/venv/venv1/Lib/site-packages/opencensus/ext/azure/trace_exporter/__init__.py +236 -236
- py2docfx/venv/venv1/Lib/site-packages/packaging/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/packaging/_elffile.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_manylinux.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_parser.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/_tokenizer.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/packaging/licenses/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/packaging/markers.py +53 -22
- py2docfx/venv/venv1/Lib/site-packages/packaging/metadata.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/specifiers.py +1 -2
- py2docfx/venv/venv1/Lib/site-packages/packaging/tags.py +39 -0
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/__init__.py +6 -7
- py2docfx/venv/venv1/Lib/site-packages/requests/__version__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/requests/compat.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/requests/models.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/requests/utils.py +6 -16
- py2docfx/venv/venv1/Lib/site-packages/rsa/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/rsa/asn1.py +52 -52
- py2docfx/venv/venv1/Lib/site-packages/rsa/cli.py +321 -321
- py2docfx/venv/venv1/Lib/site-packages/rsa/common.py +184 -184
- py2docfx/venv/venv1/Lib/site-packages/rsa/core.py +53 -53
- py2docfx/venv/venv1/Lib/site-packages/rsa/key.py +858 -858
- py2docfx/venv/venv1/Lib/site-packages/rsa/parallel.py +96 -96
- py2docfx/venv/venv1/Lib/site-packages/rsa/pem.py +134 -134
- py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1.py +485 -485
- py2docfx/venv/venv1/Lib/site-packages/rsa/pkcs1_v2.py +100 -100
- py2docfx/venv/venv1/Lib/site-packages/rsa/prime.py +198 -198
- py2docfx/venv/venv1/Lib/site-packages/rsa/py.typed +1 -1
- py2docfx/venv/venv1/Lib/site-packages/rsa/randnum.py +95 -95
- py2docfx/venv/venv1/Lib/site-packages/rsa/transform.py +72 -72
- py2docfx/venv/venv1/Lib/site-packages/rsa/util.py +97 -97
- py2docfx/venv/venv1/Lib/site-packages/setuptools/__init__.py +0 -38
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_discovery.py +33 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py +63 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +5 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_entry_points.py +4 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_normalization.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_path.py +12 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_reqs.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_scripts.py +361 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_shutil.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/build_meta.py +25 -37
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_egg.py +9 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_wheel.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_ext.py +29 -28
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/develop.py +39 -179
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/easy_install.py +17 -2352
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +14 -31
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/egg_info.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +3 -55
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_scripts.py +5 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/sdist.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/compat/py310.py +11 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/dist.py +10 -12
- py2docfx/venv/venv1/Lib/site-packages/setuptools/installer.py +34 -29
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/contexts.py +0 -14
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/fixtures.py +235 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/integration/test_pbr.py +20 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_meta.py +0 -24
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_develop.py +1 -64
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist_info.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_editable_install.py +15 -41
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_egg_info.py +3 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_scripts.py +12 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_wheel.py +12 -36
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/wheel.py +49 -24
- py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +357 -703
- py2docfx/venv/venv1/Lib/site-packages/urllib3/_version.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/urllib3/connection.py +87 -38
- py2docfx/venv/venv1/Lib/site-packages/urllib3/contrib/emscripten/fetch.py +20 -0
- py2docfx/venv/venv1/Lib/site-packages/urllib3/poolmanager.py +17 -1
- py2docfx/venv/venv1/Lib/site-packages/urllib3/response.py +53 -24
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/request.py +12 -4
- py2docfx/venv/venv1/Lib/site-packages/urllib3/util/ssl_.py +1 -1
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/METADATA +1 -1
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/RECORD +374 -372
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/WHEEL +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/package_index.py +0 -1137
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/sandbox.py +0 -536
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/server.py +0 -86
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/_credentials/application.py +0 -119
- py2docfx/venv/venv1/Lib/site-packages/azure/identity/aio/_credentials/application.py +0 -121
- py2docfx/venv/venv1/Lib/site-packages/setuptools/package_index.py +0 -1137
- py2docfx/venv/venv1/Lib/site-packages/setuptools/sandbox.py +0 -536
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/server.py +0 -86
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_easy_install.py +0 -1476
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_packageindex.py +0 -267
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_sandbox.py +0 -134
- {py2docfx-0.1.16.dev2064350.dist-info → py2docfx-0.1.17.dist-info}/top_level.txt +0 -0
@@ -1,176 +1,176 @@
|
|
1
|
-
# Copyright 2019, OpenCensus Authors
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
import sys
|
16
|
-
import threading
|
17
|
-
import time
|
18
|
-
|
19
|
-
from opencensus.metrics.export.gauge import DerivedDoubleGauge
|
20
|
-
|
21
|
-
if sys.version_info < (3,):
|
22
|
-
from BaseHTTPServer import HTTPServer
|
23
|
-
else:
|
24
|
-
from http.server import HTTPServer
|
25
|
-
|
26
|
-
_requests_lock = threading.Lock()
|
27
|
-
requests_map = dict()
|
28
|
-
ORIGINAL_CONSTRUCTOR = HTTPServer.__init__
|
29
|
-
|
30
|
-
|
31
|
-
def request_patch(func):
|
32
|
-
def wrapper(self=None):
|
33
|
-
start_time = time.time()
|
34
|
-
func(self)
|
35
|
-
end_time = time.time()
|
36
|
-
|
37
|
-
update_request_state(start_time, end_time)
|
38
|
-
|
39
|
-
return wrapper
|
40
|
-
|
41
|
-
|
42
|
-
def update_request_state(start_time, end_time):
|
43
|
-
# Update requests state information
|
44
|
-
# We don't want multiple threads updating this at once
|
45
|
-
with _requests_lock:
|
46
|
-
# Update Count
|
47
|
-
count = requests_map.get('count', 0)
|
48
|
-
requests_map['count'] = count + 1
|
49
|
-
# Update duration
|
50
|
-
duration = requests_map.get('duration', 0)
|
51
|
-
requests_map['duration'] = duration + (end_time - start_time)
|
52
|
-
|
53
|
-
|
54
|
-
def server_patch(*args, **kwargs):
|
55
|
-
if len(args) >= 3:
|
56
|
-
handler = args[2]
|
57
|
-
if handler:
|
58
|
-
# Patch the handler methods if they exist
|
59
|
-
if "do_DELETE" in dir(handler):
|
60
|
-
handler.do_DELETE = request_patch(handler.do_DELETE)
|
61
|
-
if "do_GET" in dir(handler):
|
62
|
-
handler.do_GET = request_patch(handler.do_GET)
|
63
|
-
if "do_HEAD" in dir(handler):
|
64
|
-
handler.do_HEAD = request_patch(handler.do_HEAD)
|
65
|
-
if "do_OPTIONS" in dir(handler):
|
66
|
-
handler.do_OPTIONS = request_patch(handler.do_OPTIONS)
|
67
|
-
if "do_POST" in dir(handler):
|
68
|
-
handler.do_POST = request_patch(handler.do_POST)
|
69
|
-
if "do_PUT" in dir(handler):
|
70
|
-
handler.do_PUT = request_patch(handler.do_PUT)
|
71
|
-
result = ORIGINAL_CONSTRUCTOR(*args, **kwargs)
|
72
|
-
return result
|
73
|
-
|
74
|
-
|
75
|
-
def setup():
|
76
|
-
# Patch the HTTPServer handler to track request information
|
77
|
-
HTTPServer.__init__ = server_patch
|
78
|
-
|
79
|
-
|
80
|
-
def get_average_execution_time():
|
81
|
-
last_average_duration = requests_map.get('last_average_duration', 0)
|
82
|
-
interval_duration = requests_map.get('duration', 0) \
|
83
|
-
- requests_map.get('last_duration', 0)
|
84
|
-
interval_count = requests_map.get('count', 0) \
|
85
|
-
- requests_map.get('last_count', 0)
|
86
|
-
try:
|
87
|
-
result = interval_duration / interval_count
|
88
|
-
requests_map['last_average_duration'] = result
|
89
|
-
requests_map['last_duration'] = requests_map.get('duration', 0)
|
90
|
-
# Convert to milliseconds
|
91
|
-
return result * 1000.0
|
92
|
-
except ZeroDivisionError:
|
93
|
-
# If interval_count is 0, exporter call made too close to previous
|
94
|
-
# Return the previous result if this is the case
|
95
|
-
return last_average_duration * 1000.0
|
96
|
-
|
97
|
-
|
98
|
-
def get_requests_rate():
|
99
|
-
current_time = time.time()
|
100
|
-
last_rate = requests_map.get('last_rate', 0)
|
101
|
-
last_time = requests_map.get('last_time')
|
102
|
-
|
103
|
-
try:
|
104
|
-
# last_rate_time is None the first time this function is called
|
105
|
-
if last_time is not None:
|
106
|
-
interval_time = current_time - requests_map.get('last_time', 0)
|
107
|
-
interval_count = requests_map.get('count', 0) \
|
108
|
-
- requests_map.get('last_count', 0)
|
109
|
-
result = interval_count / interval_time
|
110
|
-
else:
|
111
|
-
result = 0
|
112
|
-
requests_map['last_time'] = current_time
|
113
|
-
requests_map['last_count'] = requests_map.get('count', 0)
|
114
|
-
requests_map['last_rate'] = result
|
115
|
-
return result
|
116
|
-
except ZeroDivisionError:
|
117
|
-
# If elapsed_seconds is 0, exporter call made too close to previous
|
118
|
-
# Return the previous result if this is the case
|
119
|
-
return last_rate
|
120
|
-
|
121
|
-
|
122
|
-
class RequestsAvgExecutionMetric(object):
|
123
|
-
NAME = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"
|
124
|
-
|
125
|
-
def __init__(self):
|
126
|
-
setup()
|
127
|
-
|
128
|
-
@staticmethod
|
129
|
-
def get_value():
|
130
|
-
return get_average_execution_time()
|
131
|
-
|
132
|
-
def __call__(self):
|
133
|
-
""" Returns a derived gauge for incoming requests execution rate
|
134
|
-
|
135
|
-
Calculated by getting the time it takes to make an incoming request
|
136
|
-
and dividing over the amount of incoming requests over an elapsed time.
|
137
|
-
|
138
|
-
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
139
|
-
:return: The gauge representing the incoming requests metric
|
140
|
-
"""
|
141
|
-
gauge = DerivedDoubleGauge(
|
142
|
-
RequestsAvgExecutionMetric.NAME,
|
143
|
-
'Incoming Requests Average Execution Rate',
|
144
|
-
'milliseconds',
|
145
|
-
[])
|
146
|
-
gauge.create_default_time_series(RequestsAvgExecutionMetric.get_value)
|
147
|
-
return gauge
|
148
|
-
|
149
|
-
|
150
|
-
class RequestsRateMetric(object):
|
151
|
-
NAME = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec"
|
152
|
-
|
153
|
-
def __init__(self):
|
154
|
-
setup()
|
155
|
-
|
156
|
-
@staticmethod
|
157
|
-
def get_value():
|
158
|
-
return get_requests_rate()
|
159
|
-
|
160
|
-
def __call__(self):
|
161
|
-
""" Returns a derived gauge for incoming requests per second
|
162
|
-
|
163
|
-
Calculated by obtaining by getting the number of incoming requests
|
164
|
-
made to an HTTPServer within an elapsed time and dividing that value
|
165
|
-
over the elapsed time.
|
166
|
-
|
167
|
-
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
168
|
-
:return: The gauge representing the incoming requests metric
|
169
|
-
"""
|
170
|
-
gauge = DerivedDoubleGauge(
|
171
|
-
RequestsRateMetric.NAME,
|
172
|
-
'Incoming Requests per second',
|
173
|
-
'rps',
|
174
|
-
[])
|
175
|
-
gauge.create_default_time_series(RequestsRateMetric.get_value)
|
176
|
-
return gauge
|
1
|
+
# Copyright 2019, OpenCensus Authors
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
import sys
|
16
|
+
import threading
|
17
|
+
import time
|
18
|
+
|
19
|
+
from opencensus.metrics.export.gauge import DerivedDoubleGauge
|
20
|
+
|
21
|
+
if sys.version_info < (3,):
|
22
|
+
from BaseHTTPServer import HTTPServer
|
23
|
+
else:
|
24
|
+
from http.server import HTTPServer
|
25
|
+
|
26
|
+
_requests_lock = threading.Lock()
|
27
|
+
requests_map = dict()
|
28
|
+
ORIGINAL_CONSTRUCTOR = HTTPServer.__init__
|
29
|
+
|
30
|
+
|
31
|
+
def request_patch(func):
|
32
|
+
def wrapper(self=None):
|
33
|
+
start_time = time.time()
|
34
|
+
func(self)
|
35
|
+
end_time = time.time()
|
36
|
+
|
37
|
+
update_request_state(start_time, end_time)
|
38
|
+
|
39
|
+
return wrapper
|
40
|
+
|
41
|
+
|
42
|
+
def update_request_state(start_time, end_time):
|
43
|
+
# Update requests state information
|
44
|
+
# We don't want multiple threads updating this at once
|
45
|
+
with _requests_lock:
|
46
|
+
# Update Count
|
47
|
+
count = requests_map.get('count', 0)
|
48
|
+
requests_map['count'] = count + 1
|
49
|
+
# Update duration
|
50
|
+
duration = requests_map.get('duration', 0)
|
51
|
+
requests_map['duration'] = duration + (end_time - start_time)
|
52
|
+
|
53
|
+
|
54
|
+
def server_patch(*args, **kwargs):
|
55
|
+
if len(args) >= 3:
|
56
|
+
handler = args[2]
|
57
|
+
if handler:
|
58
|
+
# Patch the handler methods if they exist
|
59
|
+
if "do_DELETE" in dir(handler):
|
60
|
+
handler.do_DELETE = request_patch(handler.do_DELETE)
|
61
|
+
if "do_GET" in dir(handler):
|
62
|
+
handler.do_GET = request_patch(handler.do_GET)
|
63
|
+
if "do_HEAD" in dir(handler):
|
64
|
+
handler.do_HEAD = request_patch(handler.do_HEAD)
|
65
|
+
if "do_OPTIONS" in dir(handler):
|
66
|
+
handler.do_OPTIONS = request_patch(handler.do_OPTIONS)
|
67
|
+
if "do_POST" in dir(handler):
|
68
|
+
handler.do_POST = request_patch(handler.do_POST)
|
69
|
+
if "do_PUT" in dir(handler):
|
70
|
+
handler.do_PUT = request_patch(handler.do_PUT)
|
71
|
+
result = ORIGINAL_CONSTRUCTOR(*args, **kwargs)
|
72
|
+
return result
|
73
|
+
|
74
|
+
|
75
|
+
def setup():
|
76
|
+
# Patch the HTTPServer handler to track request information
|
77
|
+
HTTPServer.__init__ = server_patch
|
78
|
+
|
79
|
+
|
80
|
+
def get_average_execution_time():
|
81
|
+
last_average_duration = requests_map.get('last_average_duration', 0)
|
82
|
+
interval_duration = requests_map.get('duration', 0) \
|
83
|
+
- requests_map.get('last_duration', 0)
|
84
|
+
interval_count = requests_map.get('count', 0) \
|
85
|
+
- requests_map.get('last_count', 0)
|
86
|
+
try:
|
87
|
+
result = interval_duration / interval_count
|
88
|
+
requests_map['last_average_duration'] = result
|
89
|
+
requests_map['last_duration'] = requests_map.get('duration', 0)
|
90
|
+
# Convert to milliseconds
|
91
|
+
return result * 1000.0
|
92
|
+
except ZeroDivisionError:
|
93
|
+
# If interval_count is 0, exporter call made too close to previous
|
94
|
+
# Return the previous result if this is the case
|
95
|
+
return last_average_duration * 1000.0
|
96
|
+
|
97
|
+
|
98
|
+
def get_requests_rate():
|
99
|
+
current_time = time.time()
|
100
|
+
last_rate = requests_map.get('last_rate', 0)
|
101
|
+
last_time = requests_map.get('last_time')
|
102
|
+
|
103
|
+
try:
|
104
|
+
# last_rate_time is None the first time this function is called
|
105
|
+
if last_time is not None:
|
106
|
+
interval_time = current_time - requests_map.get('last_time', 0)
|
107
|
+
interval_count = requests_map.get('count', 0) \
|
108
|
+
- requests_map.get('last_count', 0)
|
109
|
+
result = interval_count / interval_time
|
110
|
+
else:
|
111
|
+
result = 0
|
112
|
+
requests_map['last_time'] = current_time
|
113
|
+
requests_map['last_count'] = requests_map.get('count', 0)
|
114
|
+
requests_map['last_rate'] = result
|
115
|
+
return result
|
116
|
+
except ZeroDivisionError:
|
117
|
+
# If elapsed_seconds is 0, exporter call made too close to previous
|
118
|
+
# Return the previous result if this is the case
|
119
|
+
return last_rate
|
120
|
+
|
121
|
+
|
122
|
+
class RequestsAvgExecutionMetric(object):
|
123
|
+
NAME = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"
|
124
|
+
|
125
|
+
def __init__(self):
|
126
|
+
setup()
|
127
|
+
|
128
|
+
@staticmethod
|
129
|
+
def get_value():
|
130
|
+
return get_average_execution_time()
|
131
|
+
|
132
|
+
def __call__(self):
|
133
|
+
""" Returns a derived gauge for incoming requests execution rate
|
134
|
+
|
135
|
+
Calculated by getting the time it takes to make an incoming request
|
136
|
+
and dividing over the amount of incoming requests over an elapsed time.
|
137
|
+
|
138
|
+
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
139
|
+
:return: The gauge representing the incoming requests metric
|
140
|
+
"""
|
141
|
+
gauge = DerivedDoubleGauge(
|
142
|
+
RequestsAvgExecutionMetric.NAME,
|
143
|
+
'Incoming Requests Average Execution Rate',
|
144
|
+
'milliseconds',
|
145
|
+
[])
|
146
|
+
gauge.create_default_time_series(RequestsAvgExecutionMetric.get_value)
|
147
|
+
return gauge
|
148
|
+
|
149
|
+
|
150
|
+
class RequestsRateMetric(object):
|
151
|
+
NAME = "\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec"
|
152
|
+
|
153
|
+
def __init__(self):
|
154
|
+
setup()
|
155
|
+
|
156
|
+
@staticmethod
|
157
|
+
def get_value():
|
158
|
+
return get_requests_rate()
|
159
|
+
|
160
|
+
def __call__(self):
|
161
|
+
""" Returns a derived gauge for incoming requests per second
|
162
|
+
|
163
|
+
Calculated by obtaining by getting the number of incoming requests
|
164
|
+
made to an HTTPServer within an elapsed time and dividing that value
|
165
|
+
over the elapsed time.
|
166
|
+
|
167
|
+
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
168
|
+
:return: The gauge representing the incoming requests metric
|
169
|
+
"""
|
170
|
+
gauge = DerivedDoubleGauge(
|
171
|
+
RequestsRateMetric.NAME,
|
172
|
+
'Incoming Requests per second',
|
173
|
+
'rps',
|
174
|
+
[])
|
175
|
+
gauge.create_default_time_series(RequestsRateMetric.get_value)
|
176
|
+
return gauge
|
@@ -1,42 +1,42 @@
|
|
1
|
-
# Copyright 2019, OpenCensus Authors
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
import psutil
|
16
|
-
|
17
|
-
from opencensus.metrics.export.gauge import DerivedLongGauge
|
18
|
-
|
19
|
-
|
20
|
-
class AvailableMemoryMetric(object):
|
21
|
-
NAME = "\\Memory\\Available Bytes"
|
22
|
-
|
23
|
-
@staticmethod
|
24
|
-
def get_value():
|
25
|
-
return psutil.virtual_memory().available
|
26
|
-
|
27
|
-
def __call__(self):
|
28
|
-
""" Returns a derived gauge for available memory
|
29
|
-
|
30
|
-
Available memory is defined as memory that can be given instantly to
|
31
|
-
processes without the system going into swap.
|
32
|
-
|
33
|
-
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
34
|
-
:return: The gauge representing the available memory metric
|
35
|
-
"""
|
36
|
-
gauge = DerivedLongGauge(
|
37
|
-
AvailableMemoryMetric.NAME,
|
38
|
-
'Amount of available memory in bytes',
|
39
|
-
'byte',
|
40
|
-
[])
|
41
|
-
gauge.create_default_time_series(AvailableMemoryMetric.get_value)
|
42
|
-
return gauge
|
1
|
+
# Copyright 2019, OpenCensus Authors
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
import psutil
|
16
|
+
|
17
|
+
from opencensus.metrics.export.gauge import DerivedLongGauge
|
18
|
+
|
19
|
+
|
20
|
+
class AvailableMemoryMetric(object):
|
21
|
+
NAME = "\\Memory\\Available Bytes"
|
22
|
+
|
23
|
+
@staticmethod
|
24
|
+
def get_value():
|
25
|
+
return psutil.virtual_memory().available
|
26
|
+
|
27
|
+
def __call__(self):
|
28
|
+
""" Returns a derived gauge for available memory
|
29
|
+
|
30
|
+
Available memory is defined as memory that can be given instantly to
|
31
|
+
processes without the system going into swap.
|
32
|
+
|
33
|
+
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
34
|
+
:return: The gauge representing the available memory metric
|
35
|
+
"""
|
36
|
+
gauge = DerivedLongGauge(
|
37
|
+
AvailableMemoryMetric.NAME,
|
38
|
+
'Amount of available memory in bytes',
|
39
|
+
'byte',
|
40
|
+
[])
|
41
|
+
gauge.create_default_time_series(AvailableMemoryMetric.get_value)
|
42
|
+
return gauge
|
@@ -1,87 +1,87 @@
|
|
1
|
-
# Copyright 2019, OpenCensus Authors
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
import logging
|
16
|
-
|
17
|
-
import psutil
|
18
|
-
|
19
|
-
from opencensus.metrics.export.gauge import (
|
20
|
-
DerivedDoubleGauge,
|
21
|
-
DerivedLongGauge,
|
22
|
-
)
|
23
|
-
|
24
|
-
logger = logging.getLogger(__name__)
|
25
|
-
PROCESS = psutil.Process()
|
26
|
-
|
27
|
-
|
28
|
-
class ProcessMemoryMetric(object):
|
29
|
-
NAME = "\\Process(??APP_WIN32_PROC??)\\Private Bytes"
|
30
|
-
|
31
|
-
@staticmethod
|
32
|
-
def get_value():
|
33
|
-
try:
|
34
|
-
return PROCESS.memory_info().rss
|
35
|
-
except Exception:
|
36
|
-
logger.exception('Error handling get process private bytes.')
|
37
|
-
|
38
|
-
def __call__(self):
|
39
|
-
""" Returns a derived gauge for private bytes for the current process
|
40
|
-
|
41
|
-
Private bytes for the current process is measured by the Resident Set
|
42
|
-
Size, which is the non-swapped physical memory a process has used.
|
43
|
-
|
44
|
-
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
45
|
-
:return: The gauge representing the private bytes metric
|
46
|
-
"""
|
47
|
-
gauge = DerivedLongGauge(
|
48
|
-
ProcessMemoryMetric.NAME,
|
49
|
-
'Amount of memory process has used in bytes',
|
50
|
-
'byte',
|
51
|
-
[])
|
52
|
-
gauge.create_default_time_series(ProcessMemoryMetric.get_value)
|
53
|
-
return gauge
|
54
|
-
|
55
|
-
|
56
|
-
class ProcessCPUMetric(object):
|
57
|
-
NAME = "\\Process(??APP_WIN32_PROC??)\\% Processor Time"
|
58
|
-
|
59
|
-
@staticmethod
|
60
|
-
def get_value():
|
61
|
-
try:
|
62
|
-
# In the case of a process running on multiple threads on different
|
63
|
-
# CPU cores, the returned value of cpu_percent() can be > 100.0. We
|
64
|
-
# normalize the cpu process using the number of logical CPUs
|
65
|
-
cpu_count = psutil.cpu_count(logical=True)
|
66
|
-
return PROCESS.cpu_percent() / cpu_count
|
67
|
-
except Exception:
|
68
|
-
logger.exception('Error handling get process cpu usage.')
|
69
|
-
|
70
|
-
def __call__(self):
|
71
|
-
""" Returns a derived gauge for the CPU usage for the current process.
|
72
|
-
Return values range from 0.0 to 100.0 inclusive.
|
73
|
-
:rtype: :class:`opencensus.metrics.export.gauge.DerivedDoubleGauge`
|
74
|
-
:return: The gauge representing the process cpu usage metric
|
75
|
-
"""
|
76
|
-
gauge = DerivedDoubleGauge(
|
77
|
-
ProcessCPUMetric.NAME,
|
78
|
-
'Process CPU usage as a percentage',
|
79
|
-
'percentage',
|
80
|
-
[])
|
81
|
-
gauge.create_default_time_series(ProcessCPUMetric.get_value)
|
82
|
-
# From the psutil docs: the first time this method is called with
|
83
|
-
# interval = None it will return a meaningless 0.0 value which you are
|
84
|
-
# supposed to ignore. Call cpu_percent() with process once so that the
|
85
|
-
# subsequent calls from the gauge will be meaningful.
|
86
|
-
PROCESS.cpu_percent()
|
87
|
-
return gauge
|
1
|
+
# Copyright 2019, OpenCensus Authors
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
import logging
|
16
|
+
|
17
|
+
import psutil
|
18
|
+
|
19
|
+
from opencensus.metrics.export.gauge import (
|
20
|
+
DerivedDoubleGauge,
|
21
|
+
DerivedLongGauge,
|
22
|
+
)
|
23
|
+
|
24
|
+
logger = logging.getLogger(__name__)
|
25
|
+
PROCESS = psutil.Process()
|
26
|
+
|
27
|
+
|
28
|
+
class ProcessMemoryMetric(object):
|
29
|
+
NAME = "\\Process(??APP_WIN32_PROC??)\\Private Bytes"
|
30
|
+
|
31
|
+
@staticmethod
|
32
|
+
def get_value():
|
33
|
+
try:
|
34
|
+
return PROCESS.memory_info().rss
|
35
|
+
except Exception:
|
36
|
+
logger.exception('Error handling get process private bytes.')
|
37
|
+
|
38
|
+
def __call__(self):
|
39
|
+
""" Returns a derived gauge for private bytes for the current process
|
40
|
+
|
41
|
+
Private bytes for the current process is measured by the Resident Set
|
42
|
+
Size, which is the non-swapped physical memory a process has used.
|
43
|
+
|
44
|
+
:rtype: :class:`opencensus.metrics.export.gauge.DerivedLongGauge`
|
45
|
+
:return: The gauge representing the private bytes metric
|
46
|
+
"""
|
47
|
+
gauge = DerivedLongGauge(
|
48
|
+
ProcessMemoryMetric.NAME,
|
49
|
+
'Amount of memory process has used in bytes',
|
50
|
+
'byte',
|
51
|
+
[])
|
52
|
+
gauge.create_default_time_series(ProcessMemoryMetric.get_value)
|
53
|
+
return gauge
|
54
|
+
|
55
|
+
|
56
|
+
class ProcessCPUMetric(object):
|
57
|
+
NAME = "\\Process(??APP_WIN32_PROC??)\\% Processor Time"
|
58
|
+
|
59
|
+
@staticmethod
|
60
|
+
def get_value():
|
61
|
+
try:
|
62
|
+
# In the case of a process running on multiple threads on different
|
63
|
+
# CPU cores, the returned value of cpu_percent() can be > 100.0. We
|
64
|
+
# normalize the cpu process using the number of logical CPUs
|
65
|
+
cpu_count = psutil.cpu_count(logical=True)
|
66
|
+
return PROCESS.cpu_percent() / cpu_count
|
67
|
+
except Exception:
|
68
|
+
logger.exception('Error handling get process cpu usage.')
|
69
|
+
|
70
|
+
def __call__(self):
|
71
|
+
""" Returns a derived gauge for the CPU usage for the current process.
|
72
|
+
Return values range from 0.0 to 100.0 inclusive.
|
73
|
+
:rtype: :class:`opencensus.metrics.export.gauge.DerivedDoubleGauge`
|
74
|
+
:return: The gauge representing the process cpu usage metric
|
75
|
+
"""
|
76
|
+
gauge = DerivedDoubleGauge(
|
77
|
+
ProcessCPUMetric.NAME,
|
78
|
+
'Process CPU usage as a percentage',
|
79
|
+
'percentage',
|
80
|
+
[])
|
81
|
+
gauge.create_default_time_series(ProcessCPUMetric.get_value)
|
82
|
+
# From the psutil docs: the first time this method is called with
|
83
|
+
# interval = None it will return a meaningless 0.0 value which you are
|
84
|
+
# supposed to ignore. Call cpu_percent() with process once so that the
|
85
|
+
# subsequent calls from the gauge will be meaningful.
|
86
|
+
PROCESS.cpu_percent()
|
87
|
+
return gauge
|
@@ -1 +1 @@
|
|
1
|
-
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
1
|
+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|