Merge "Update perf tests to always run each test in a fresh process." into ics-mr1

This commit is contained in:
Dianne Hackborn
2011-11-07 18:46:54 -08:00
committed by Android (Google) Code Review
8 changed files with 1399 additions and 1035 deletions

View File

@@ -18,7 +18,12 @@ android.accounts.IAccountManagerResponse
android.accounts.IAccountManagerResponse$Stub
android.animation.Animator
android.animation.Animator$AnimatorListener
android.animation.AnimatorInflater
android.animation.AnimatorListenerAdapter
android.animation.AnimatorSet
android.animation.AnimatorSet$AnimatorSetListener
android.animation.AnimatorSet$Builder
android.animation.AnimatorSet$Node
android.animation.FloatEvaluator
android.animation.FloatKeyframeSet
android.animation.IntEvaluator
@@ -57,6 +62,7 @@ android.app.ActivityThread$CreateServiceData
android.app.ActivityThread$GcIdler
android.app.ActivityThread$H
android.app.ActivityThread$Idler
android.app.ActivityThread$Profiler
android.app.ActivityThread$ProviderClientRecord
android.app.ActivityThread$ProviderRefCount
android.app.ActivityThread$ReceiverData
@@ -71,6 +77,8 @@ android.app.ApplicationLoaders
android.app.ApplicationPackageManager
android.app.ApplicationPackageManager$ResourceName
android.app.ApplicationThreadNative
android.app.BackStackRecord
android.app.BackStackRecord$Op
android.app.ContextImpl
android.app.ContextImpl$1
android.app.ContextImpl$10
@@ -111,9 +119,15 @@ android.app.ContextImpl$StaticServiceFetcher
android.app.Dialog
android.app.Dialog$1
android.app.Dialog$ListenersHandler
android.app.DialogFragment
android.app.Fragment
android.app.FragmentManager
android.app.FragmentManager$BackStackEntry
android.app.FragmentManagerImpl
android.app.FragmentManagerImpl$1
android.app.FragmentManagerImpl$2
android.app.FragmentManagerImpl$3
android.app.FragmentTransaction
android.app.IActivityManager
android.app.IActivityManager$ContentProviderHolder
android.app.IActivityManager$ContentProviderHolder$1
@@ -134,6 +148,10 @@ android.app.Instrumentation
android.app.IntentReceiverLeaked
android.app.IntentService
android.app.IntentService$ServiceHandler
android.app.ListActivity
android.app.ListActivity$1
android.app.ListActivity$2
android.app.ListFragment
android.app.LoadedApk
android.app.LoadedApk$ReceiverDispatcher
android.app.LoadedApk$ReceiverDispatcher$Args
@@ -328,6 +346,7 @@ android.emoji.EmojiFactory
android.graphics.AvoidXfermode
android.graphics.Bitmap
android.graphics.Bitmap$1
android.graphics.Bitmap$2
android.graphics.Bitmap$BitmapFinalizer
android.graphics.Bitmap$Config
android.graphics.BitmapFactory
@@ -719,6 +738,7 @@ android.text.style.LineHeightSpan
android.text.style.MetricAffectingSpan
android.text.style.ParagraphStyle
android.text.style.ReplacementSpan
android.text.style.SpellCheckSpan
android.text.style.StyleSpan
android.text.style.SuggestionSpan
android.text.style.UpdateAppearance
@@ -870,6 +890,7 @@ android.view.View$OnLongClickListener
android.view.View$OnTouchListener
android.view.View$PerformClick
android.view.View$ScrollabilityCache
android.view.View$TransformationInfo
android.view.View$UnsetPressedState
android.view.ViewConfiguration
android.view.ViewGroup
@@ -934,6 +955,7 @@ android.view.inputmethod.EditorInfo$1
android.view.inputmethod.ExtractedText
android.view.inputmethod.ExtractedText$1
android.view.inputmethod.InputConnection
android.view.inputmethod.InputConnectionWrapper
android.view.inputmethod.InputMethodManager
android.view.inputmethod.InputMethodManager$1
android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
@@ -946,12 +968,16 @@ android.webkit.WebViewCore
android.widget.AbsListView
android.widget.AbsListView$1
android.widget.AbsListView$2
android.widget.AbsListView$3
android.widget.AbsListView$AdapterDataSetObserver
android.widget.AbsListView$CheckForTap
android.widget.AbsListView$FlingRunnable
android.widget.AbsListView$FlingRunnable$1
android.widget.AbsListView$LayoutParams
android.widget.AbsListView$OnScrollListener
android.widget.AbsListView$PerformClick
android.widget.AbsListView$RecycleBin
android.widget.AbsListView$RecyclerListener
android.widget.AbsListView$SavedState
android.widget.AbsListView$SavedState$1
android.widget.AbsListView$SelectionBoundsAdjuster
@@ -975,13 +1001,19 @@ android.widget.CheckBox
android.widget.Checkable
android.widget.CheckedTextView
android.widget.CompoundButton
android.widget.CompoundButton$OnCheckedChangeListener
android.widget.CursorAdapter
android.widget.CursorFilter$CursorFilterClient
android.widget.EdgeEffect
android.widget.EdgeGlow
android.widget.EditText
android.widget.ExpandableListView
android.widget.FastScroller
android.widget.FastScroller$1
android.widget.FastScroller$ScrollFade
android.widget.Filter
android.widget.Filter$FilterListener
android.widget.Filter$FilterResults
android.widget.Filter$ResultsHandler
android.widget.Filterable
android.widget.FrameLayout
@@ -1030,17 +1062,30 @@ android.widget.SearchView
android.widget.Spinner
android.widget.SpinnerAdapter
android.widget.StackView
android.widget.Switch
android.widget.TabHost
android.widget.TabHost$ContentStrategy
android.widget.TabHost$FactoryContentStrategy
android.widget.TabHost$IndicatorStrategy
android.widget.TabHost$LabelAndIconIndicatorStrategy
android.widget.TabHost$OnTabChangeListener
android.widget.TabHost$TabContentFactory
android.widget.TabHost$TabSpec
android.widget.TabHost$ViewIndicatorStrategy
android.widget.TabWidget
android.widget.TabWidget$OnTabSelectionChanged
android.widget.TabWidget$TabClickListener
android.widget.TableLayout
android.widget.TableRow
android.widget.TextView
android.widget.TextView$2
android.widget.TextView$3
android.widget.TextView$Blink
android.widget.TextView$BufferType
android.widget.TextView$ChangeWatcher
android.widget.TextView$CharWrapper
android.widget.TextView$Drawables
android.widget.TextView$EasyEditSpanController
android.widget.TextView$InputContentType
android.widget.TextView$InputMethodState
android.widget.TextView$OnEditorActionListener

View File

@@ -13,6 +13,10 @@
</activity>
<service android:name="SchedulerService">
</service>
<service android:name="TestService" android:process=":test">
</service>
<service android:name="LocalTestService">
</service>
<receiver android:name="Receiver" android:exported="true">
</receiver>
</application>

View File

@@ -91,6 +91,11 @@
android:layout_height="wrap_content"
android:text="@string/stop"
/>
<CheckBox android:id="@+id/local"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Local"
/>
</LinearLayout>
<TextView android:id="@+id/log"

View File

@@ -0,0 +1,6 @@
package com.android.frameworkperf;
public class LocalTestService extends TestService {
void terminate() {
}
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright (C) 2011 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.
*/
package com.android.frameworkperf;
import android.os.Parcel;
import android.os.Parcelable;
public class RunResult implements Parcelable {
final String name;
final String fgLongName;
final String bgLongName;
final long fgTime;
final long fgOps;
final long bgTime;
final long bgOps;
RunResult(TestService.TestRunner op) {
name = op.getName();
fgLongName = op.getForegroundLongName();
bgLongName = op.getBackgroundLongName();
fgTime = op.getForegroundTime();
fgOps = op.getForegroundOps();
bgTime = op.getBackgroundTime();
bgOps = op.getBackgroundOps();
}
RunResult(Parcel source) {
name = source.readString();
fgLongName = source.readString();
bgLongName = source.readString();
fgTime = source.readLong();
fgOps = source.readLong();
bgTime = source.readLong();
bgOps = source.readLong();
}
float getFgMsPerOp() {
return fgOps != 0 ? (fgTime / (float)fgOps) : 0;
}
float getBgMsPerOp() {
return bgOps != 0 ? (bgTime / (float)bgOps) : 0;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeString(fgLongName);
dest.writeString(bgLongName);
dest.writeLong(fgTime);
dest.writeLong(fgOps);
dest.writeLong(bgTime);
dest.writeLong(bgOps);
}
public static final Parcelable.Creator<RunResult> CREATOR
= new Parcelable.Creator<RunResult>() {
public RunResult createFromParcel(Parcel in) {
return new RunResult(in);
}
public RunResult[] newArray(int size) {
return new RunResult[size];
}
};
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (C) 2011 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.
*/
package com.android.frameworkperf;
import android.os.Parcel;
import android.os.Parcelable;
public class TestArgs implements Parcelable {
long maxTime;
int combOp = -1;
int fgOp = -1;
int bgOp = -1;
public TestArgs() {
}
public TestArgs(Parcel source) {
maxTime = source.readLong();
combOp = source.readInt();
fgOp = source.readInt();
bgOp = source.readInt();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(maxTime);
dest.writeInt(combOp);
dest.writeInt(fgOp);
dest.writeInt(bgOp);
}
public static final Parcelable.Creator<TestArgs> CREATOR
= new Parcelable.Creator<TestArgs>() {
public TestArgs createFromParcel(Parcel in) {
return new TestArgs(in);
}
public TestArgs[] newArray(int size) {
return new TestArgs[size];
}
};
}

File diff suppressed because it is too large Load Diff