-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new task to watch logcat output and wait for activity displayed #3963
Comments
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this issue
Nov 26, 2019
Implements dotnet#3792 Add 2 targets to start and finish the profiling. The start target also builds the project with embedded aot profiler and sets its options. The finish one collects data from the device/emulator and writes them to custom.aprof file with aprofutil tool. Add documentation. Add test. Might be skipped on CI, so actual testing on CI might be done once dotnet#3740 is implemented. Originaly I wanted to have also single step process target, which would use duration=n option of the aot profiler. After discussion with @dean, it looks like it might not be usable for IDEs as it might block the UI thread. So I didn't implement that one. Instead I might do it differently by introducing new task to watch for activity displayed message in the adb logcat output, combined with timeout. dotnet#3963
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this issue
Nov 26, 2019
Implements dotnet#3792 Add 2 targets to start and finish the profiling. The start target also builds the project with embedded aot profiler and sets its options. The finish one collects data from the device/emulator and writes them to custom.aprof file with aprofutil tool. Add documentation. Add test. Might be skipped on CI, so actual testing on CI might be done once dotnet#3740 is implemented. Originaly I wanted to have also single step process target, which would use duration=n option of the aot profiler. After discussion with @dean, it looks like it might not be usable for IDEs as it might block the UI thread. So I didn't implement that one. Instead I might do it differently by introducing new task to watch for activity displayed message in the adb logcat output, combined with timeout. dotnet#3963
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this issue
Nov 26, 2019
Implements dotnet#3792 Add 2 targets to start and finish the profiling. The start target also builds the project with embedded aot profiler and sets its options. The finish one collects data from the device/emulator and writes them to custom.aprof file with aprofutil tool. Add documentation. Add test. Might be skipped on CI, so actual testing on CI might be done once dotnet#3740 is implemented. Originaly I wanted to have also single step process target, which would use duration=n option of the aot profiler. After discussion with @dean, it looks like it might not be usable for IDEs as it might block the UI thread. So I didn't implement that one. Instead I might do it differently by introducing new task to watch for activity displayed message in the adb logcat output, combined with timeout. dotnet#3963
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this issue
Nov 26, 2019
Implements dotnet#3792 Add 2 targets to start and finish the profiling. The start target also builds the project with embedded aot profiler and sets its options. The finish one collects data from the device/emulator and writes them to custom.aprof file with aprofutil tool. Add documentation. Add test. Might be skipped on CI, so actual testing on CI might be done once dotnet#3740 is implemented. Originaly I wanted to have also single step process target, which would use duration=n option of the aot profiler. After discussion with @dean, it looks like it might not be usable for IDEs as it might block the UI thread. So I didn't implement that one. Instead I might do it differently by introducing new task to watch for activity displayed message in the adb logcat output, combined with timeout. dotnet#3963
jonpryor
pushed a commit
that referenced
this issue
Dec 5, 2019
Fixes: #3792 Context: #3740 Context: #3963 Add the following targets to simplify Profiled AOT usage: * `BuildAndStartAotProfiling` * `FinishAotProfiling` The `BuildAndStartAotProfiling` target builds an Application `.csproj` with the AOT profiler embedded into the `.apk`, installs the `.apk`, sets the AOT profiler socket port to `$(AndroidAotProfilerPort)`, and starts the *launch* Activity on the target device. `$(AndroidAotProfilerPort)` defaults to port 9999. The `FinishAotProfiling` target attaches to the `$(AndroidAotProfilerPort)` port, collects the AOT profiler data from the target device, and writes the collected data into `$(AndroidAotCustomProfilePath)`. `$(AndroidAotCustomProfilePath)` defaults to `custom.aprof`. The use of these two targets allows easily launching an Activity, waiting for a period of time -- so that process startup can complete, or so that some set of application behaviors can be included into the profiled data -- and then collecting the profile.
radekdoulik
added a commit
to radekdoulik/xamarin-android
that referenced
this issue
Jan 6, 2020
) Fixes: dotnet#3792 Context: dotnet#3740 Context: dotnet#3963 Add the following targets to simplify Profiled AOT usage: * `BuildAndStartAotProfiling` * `FinishAotProfiling` The `BuildAndStartAotProfiling` target builds an Application `.csproj` with the AOT profiler embedded into the `.apk`, installs the `.apk`, sets the AOT profiler socket port to `$(AndroidAotProfilerPort)`, and starts the *launch* Activity on the target device. `$(AndroidAotProfilerPort)` defaults to port 9999. The `FinishAotProfiling` target attaches to the `$(AndroidAotProfilerPort)` port, collects the AOT profiler data from the target device, and writes the collected data into `$(AndroidAotCustomProfilePath)`. `$(AndroidAotCustomProfilePath)` defaults to `custom.aprof`. The use of these two targets allows easily launching an Activity, waiting for a period of time -- so that process startup can complete, or so that some set of application behaviors can be included into the profiled data -- and then collecting the profile.
jonpryor
pushed a commit
that referenced
this issue
Jan 7, 2020
Fixes: #3792 Context: #3740 Context: #3963 Add the following targets to simplify Profiled AOT usage: * `BuildAndStartAotProfiling` * `FinishAotProfiling` The `BuildAndStartAotProfiling` target builds an Application `.csproj` with the AOT profiler embedded into the `.apk`, installs the `.apk`, sets the AOT profiler socket port to `$(AndroidAotProfilerPort)`, and starts the *launch* Activity on the target device. `$(AndroidAotProfilerPort)` defaults to port 9999. The `FinishAotProfiling` target attaches to the `$(AndroidAotProfilerPort)` port, collects the AOT profiler data from the target device, and writes the collected data into `$(AndroidAotCustomProfilePath)`. `$(AndroidAotCustomProfilePath)` defaults to `custom.aprof`. The use of these two targets allows easily launching an Activity, waiting for a period of time -- so that process startup can complete, or so that some set of application behaviors can be included into the profiled data -- and then collecting the profile.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The task would wait for activity manager reporting that the launcher activity was displayed.
It will also have a timeout as a parameter as the activity displayed message is not reliable.
The text was updated successfully, but these errors were encountered: