1ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang/*
2ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * Copyright (C) 2009 The Android Open Source Project
3ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang *
4ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * Licensed under the Apache License, Version 2.0 (the "License");
5ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * you may not use this file except in compliance with the License.
6ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * You may obtain a copy of the License at
7ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang *
8ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang *      http://www.apache.org/licenses/LICENSE-2.0
9ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang *
10ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * Unless required by applicable law or agreed to in writing, software
11ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * distributed under the License is distributed on an "AS IS" BASIS,
12ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * See the License for the specific language governing permissions and
14ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * limitations under the License.
15ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang */
16ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang
17ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wangpackage android.test;
18ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang
19ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wangimport java.lang.annotation.Retention;
20ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wangimport java.lang.annotation.RetentionPolicy;
21ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang
22ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang/**
234f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * This annotation can be used on an {@link junit.framework.TestCase}'s test methods. When the
244f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * annotation is present, the test method is timed and the results written through instrumentation
254f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * output. It can also be used on the class itself, which is equivalent to tagging all test methods
264f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * with this annotation.
274f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * <p/>
284f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * Setting {@link #includeDetailedStats()} to true causes additional metrics such as memory usage
294f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang * and binder transactions to be gathered and written through instrumentation output.
30ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang *
31ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang * {@hide} Pending approval for public API.
32ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang */
33ff1df69dd4835c177c724e1b5f1ba02d1f674047Jack Wang@Retention(RetentionPolicy.RUNTIME)
344f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wangpublic @interface TimedTest {
354f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang    boolean includeDetailedStats() default false;
364f414bd7a76fc7ff063db70d1cdd09303c28cbe5Jack Wang}
37