John Reck b89a63447e Add AM benchmark/stresser
Bug: 28606903

What this test does is sends a startService
to a service defined in a new process. That service
then sends a broadcast that it was started, which
is received in the originating process. After
that broadcast is sent it stopSelf()'s and exit(0)'s.

The time it takes from start -> started as well as
the service -> receiver are tracked and reported.

The test does this round trip ping/pong in multiple
configurations. First doing just 1 at a time, then
2 at a time, then 4, then etc... all the way up to
10 active startService/sendBroadcasts at a time
across 10 worker threads in the main process.

There's a ring buffer of 100 services in 100 different
sub processes to ensure that every startService
goes through the entire zygote-fork bringup with
no risk of overlapping with the dying/stopping of a
previous startService.

Change-Id: I4f19e89ae1b14c9d1660d8a546ccbb92ec5127cd
2016-05-06 16:40:36 +00:00

39 lines
1.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="test.amslam.MainActivity">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/run"
android:text="@string/run" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/output" />
</LinearLayout>