• Home
  • Raw
  • Download

Lines Matching refs:self

36     def test_app_profiler(self):  argument
37 self.common_test_app_profiler()
39 def test_app_profiler_profile_from_launch(self): argument
40 self.run_app_profiler(start_activity=True, build_binary_cache=False)
41 self.run_cmd(["report.py", "-g", "-o", "report.txt"])
42 self.check_strings_in_file("report.txt", [
46 def test_app_profiler_multiprocesses(self): argument
47 self.adb.check_run(['shell', 'am', 'force-stop', self.package_name])
48 self.adb.check_run(['shell', 'am', 'start', '-n',
49 self.package_name + '/.MultiProcessActivity'])
52 self.run_app_profiler(start_activity=False)
53 self.run_cmd(["report.py", "-o", "report.txt"])
54 self.check_strings_in_file("report.txt", ["BusyService", "BusyThread"])
56 def test_app_profiler_with_ctrl_c(self): argument
59 self.adb.check_run(['shell', 'am', 'start', '-n', self.package_name + '/.MainActivity'])
62 "--app", self.package_name, "-r", "--duration 10000", "--disable_adb_root"]
70 self.assertEqual(subproc.returncode, 0)
71 self.run_cmd(["report.py"])
73 def test_app_profiler_stop_after_app_exit(self): argument
74 self.adb.check_run(['shell', 'am', 'start', '-n', self.package_name + '/.MainActivity'])
77 '--app', self.package_name, '-r', '--duration 10000', '--disable_adb_root']
82 self.adb.check_run(['shell', 'am', 'force-stop', self.package_name])
84 self.assertEqual(subproc.returncode, 0)
85 self.run_cmd(["report.py"])
87 def test_app_profiler_with_ndk_path(self): argument
89 self.run_cmd(['app_profiler.py', '--app', self.package_name, '-a', self.activity_name,
92 def test_report(self): argument
93 self.common_test_report()
94 self.run_cmd(["report.py", "-g", "-o", "report.txt"])
95 self.check_strings_in_file("report.txt", [
99 def test_profile_with_process_id(self): argument
100 self.adb.check_run(['shell', 'am', 'start', '-n', self.package_name + '/.MainActivity'])
102 pid = self.adb.check_run_and_return_output(
104 self.run_app_profiler(start_activity=False, record_arg='-g --duration 10 -p ' + pid)
105 self.run_cmd(["report.py", "-g", "-o", "report.txt"])
106 self.check_strings_in_file("report.txt", [
110 def test_annotate(self): argument
111 self.common_test_annotate()
112 if not self.use_compiled_java_code:
115 self.check_file_under_dir("annotated_files", "MainActivity.java")
117 self.check_annotation_summary(summary_file, [
123 def test_report_sample(self): argument
124 self.common_test_report_sample(
128 def test_pprof_proto_generator(self): argument
130 if self.use_compiled_java_code:
134 self.common_test_pprof_proto_generator(
138 def test_inferno(self): argument
139 self.common_test_inferno()
140 self.run_app_profiler()
141 self.run_cmd([INFERNO_SCRIPT, "-sc"])
142 self.check_inferno_report_html(
144 self.run_cmd([INFERNO_SCRIPT, "-sc", "-o", "report2.html"])
145 self.check_inferno_report_html(
149 def test_inferno_in_another_dir(self): argument
153 self.run_cmd(['app_profiler.py', '--app', self.package_name,
155 self.check_exist(filename="perf.data")
156 self.run_cmd([INFERNO_SCRIPT, "-sc"])
158 def test_report_html(self): argument
159 self.common_test_report_html()
161 def test_run_simpleperf_without_usb_connection(self): argument
162 self.adb.check_run(['shell', 'am', 'start', '-n', self.package_name + '/.MainActivity'])
163 self.run_cmd(['run_simpleperf_without_usb_connection.py', 'start', '-p',
164 self.package_name, '--size_limit', '1M'])
165 self.adb.check_run(['kill-server'])
168 os.chdir(self.test_dir.parent)
169 self.adb.check_run(['devices'])
170 os.chdir(self.test_dir)
171 self.run_cmd(['run_simpleperf_without_usb_connection.py', 'stop'])
172 self.check_exist(filename="perf.data")
173 self.run_cmd(["report.py", "-g", "-o", "report.txt"])
185 def setUp(self): argument
199 def test_app_profiler(self): argument
200 self.common_test_app_profiler()
210 def test_smoke(self): argument
211 self.run_app_profiler(record_arg="-g -f 1000 --duration 10 -e cpu-clock:u --trace-offcpu")
212 self.run_cmd(["report.py", "-g", "-o", "report.txt"])
213 self.check_strings_in_file("report.txt", [
219 self.run_cmd(["annotate.py", "-s", self.example_path, '--summary-width', '1000'])
220 self.check_exist(dirname="annotated_files")
221 if self.use_compiled_java_code:
222 self.check_file_under_dir("annotated_files", "SleepActivity.java")
224 self.check_annotation_summary(summary_file, [
231 self.run_cmd([INFERNO_SCRIPT, "-sc"])
232 self.check_inferno_report_html(