Add a script to record Android boot time.

perfboot.py repeats the record of each event log during Android
boot specified times. By default, interval between measurements
is adjusted in such a way that CPUs are cooled down sufficiently
to avoid boot time slowdown caused by CPU thermal throttling.
This script also works around the issue of dropbox slowing down
boot time on userdebug build (http://b/20890386) by limiting
the number of files to be created by dropbox.
The result is output in a tab-separated value format.

BUG: 22207911
Change-Id: I0ddbac5d1c941efda87bc6db6388d8194d4bb3dd
diff --git a/adb/device.py b/adb/device.py
index 57f17fc..b6eaad6 100644
--- a/adb/device.py
+++ b/adb/device.py
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+import logging
 import os
 import re
 import subprocess
@@ -146,10 +147,12 @@
         return result, out
 
     def _simple_call(self, cmd):
+        logging.info(' '.join(self.adb_cmd + cmd))
         return subprocess.check_output(
             self.adb_cmd + cmd, stderr=subprocess.STDOUT)
 
     def shell(self, cmd):
+        logging.info(' '.join(self.adb_cmd + ['shell'] + cmd))
         cmd = self._make_shell_cmd(cmd)
         out = subprocess.check_output(cmd)
         rc, out = self._parse_shell_output(out)
@@ -161,6 +164,7 @@
 
     def shell_nocheck(self, cmd):
         cmd = self._make_shell_cmd(cmd)
+        logging.info(' '.join(cmd))
         p = subprocess.Popen(
             cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
         out, _ = p.communicate()
@@ -190,6 +194,9 @@
     def usb(self):
         return self._simple_call(['usb'])
 
+    def reboot(self):
+        return self._simple_call(['reboot'])
+
     def root(self):
         return self._simple_call(['root'])