Skip to content

Commit b519e17

Browse files
committed
refactor: no need for ox_profile connection
1 parent 775f1cb commit b519e17

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

coverage/cmdline.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,26 +1195,3 @@ def main_deprecated(argv: list[str] | None = None) -> int | None:
11951195
""")
11961196
)
11971197
return main(argv)
1198-
1199-
1200-
# Profiling using ox_profile. Install it from GitHub:
1201-
# pip install git+https://github.com/emin63/ox_profile.git
1202-
#
1203-
# $set_env.py: COVERAGE_PROFILE - Set to use ox_profile.
1204-
_profile = os.getenv("COVERAGE_PROFILE")
1205-
if _profile: # pragma: debugging
1206-
from ox_profile.core.launchers import SimpleLauncher # pylint: disable=import-error
1207-
1208-
original_main = main
1209-
1210-
def main( # pylint: disable=function-redefined
1211-
argv: list[str] | None = None,
1212-
) -> int | None:
1213-
"""A wrapper around main that profiles."""
1214-
profiler = SimpleLauncher.launch()
1215-
try:
1216-
return original_main(argv)
1217-
finally:
1218-
data, _ = profiler.query(re_filter="coverage", max_records=100)
1219-
print(profiler.show(query=data, limit=100, sep="", col=""))
1220-
profiler.cancel()

0 commit comments

Comments
 (0)