| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from systrace import systrace | 9 from systrace import systrace |
| 10 from systrace.agents import ftrace_agent | 10 from systrace.agents import ftrace_agent |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ['-t', '10'] | 127 systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ['-t', '10'] |
| 128 options, categories = systrace.parse_options(systrace_cmd) | 128 options, categories = systrace.parse_options(systrace_cmd) |
| 129 agent = ftrace_agent.FtraceAgent(options, categories) | 129 agent = ftrace_agent.FtraceAgent(options, categories) |
| 130 self.assertEqual(agent._get_trace_time(), 10) | 130 self.assertEqual(agent._get_trace_time(), 10) |
| 131 | 131 |
| 132 def test_buffer_size(self): | 132 def test_buffer_size(self): |
| 133 systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ['-b', '16000'] | 133 systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ['-b', '16000'] |
| 134 options, categories = systrace.parse_options(systrace_cmd) | 134 options, categories = systrace.parse_options(systrace_cmd) |
| 135 agent = ftrace_agent.FtraceAgent(options, categories) | 135 agent = ftrace_agent.FtraceAgent(options, categories) |
| 136 self.assertEqual(agent._get_trace_buffer_size(), 16000) | 136 self.assertEqual(agent._get_trace_buffer_size(), 16000) |
| OLD | NEW |