Skip to content

Commit

Permalink
Merge pull request #29 from doronz88/feature/dvt-core-profile-session…
Browse files Browse the repository at this point in the history
…-tap

CoreProfileSession: Parsing stackshots.
  • Loading branch information
doronz88 authored May 3, 2021
2 parents 1ad4250 + c9eec97 commit 0faf6a4
Show file tree
Hide file tree
Showing 3 changed files with 526 additions and 2 deletions.
11 changes: 11 additions & 0 deletions pymobiledevice3/cli/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from pymobiledevice3.services.dvt.instruments.process_control import ProcessControl
from pymobiledevice3.services.dvt.instruments.sysmontap import Sysmontap
from pymobiledevice3.services.screenshot import ScreenshotService
from pymobiledevice3.services.dvt.instruments.core_profile_session_tap import CoreProfileSessionTap


@click.group()
Expand Down Expand Up @@ -222,3 +223,13 @@ def sysmon_system(lockdown, fields):
for name, value in attrs_dict.items():
if (fields is None) or (name in fields):
print(f'{name}: {value}')


@developer.command('profile-session', cls=Command)
@click.option('--nocolor', is_flag=True)
def profile_session(lockdown, nocolor):
""" Print core profiling information. """
with DvtSecureSocketProxyService(lockdown=lockdown) as dvt:
with CoreProfileSessionTap(dvt) as tap:
for profile in tap:
print_object(profile, colored=not nocolor)
Loading

0 comments on commit 0faf6a4

Please sign in to comment.