beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rober...@apache.org
Subject [2/2] beam git commit: Add some timing information to testing scripts.
Date Tue, 26 Sep 2017 21:06:48 GMT
Add some timing information to testing scripts.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/97f7d0bf
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/97f7d0bf
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/97f7d0bf

Branch: refs/heads/master
Commit: 97f7d0bf9c4274520ad2c6954a8774ecabe78813
Parents: 732ae42
Author: Robert Bradshaw <robertwb@gmail.com>
Authored: Fri Sep 8 16:31:35 2017 -0700
Committer: Robert Bradshaw <robertwb@gmail.com>
Committed: Tue Sep 26 14:03:59 2017 -0700

----------------------------------------------------------------------
 sdks/python/gen_protos.py |  4 ++++
 sdks/python/tox.ini       | 10 +++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/97f7d0bf/sdks/python/gen_protos.py
----------------------------------------------------------------------
diff --git a/sdks/python/gen_protos.py b/sdks/python/gen_protos.py
index e3da0e7..59a98ce 100644
--- a/sdks/python/gen_protos.py
+++ b/sdks/python/gen_protos.py
@@ -25,6 +25,7 @@ import pkg_resources
 import shutil
 import subprocess
 import sys
+import time
 import warnings
 
 
@@ -114,9 +115,12 @@ def _install_grpcio_tools_and_generate_proto_files():
     shutil.rmtree(build_path)
   logging.warning('Installing grpcio-tools into %s' % install_path)
   try:
+    start = time.time()
     subprocess.check_call(
         ['pip', 'install', '--target', install_path, '--build', build_path,
          '--upgrade', GRPC_TOOLS])
+    logging.warning(
+        'Installing grpcio-tools took %0.2f seconds.' % (time.time() - start))
   finally:
     shutil.rmtree(build_path)
   sys.path.append(install_path)

http://git-wip-us.apache.org/repos/asf/beam/blob/97f7d0bf/sdks/python/tox.ini
----------------------------------------------------------------------
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
index fea3854..c8c8b88 100644
--- a/sdks/python/tox.ini
+++ b/sdks/python/tox.ini
@@ -60,7 +60,7 @@ commands =
   - find apache_beam -type f -name '*.so' -delete
   - find target/build -type f -name '*.c' -delete
   - find target/build -type f -name '*.so' -delete
-  pip install -e .[test]
+  time pip install -e .[test]
   python apache_beam/examples/complete/autocomplete_test.py
   python setup.py test
   # Clean up all cython generated files. Ignore if deletion fails.
@@ -90,8 +90,8 @@ deps=
   pycodestyle==2.3.1
   pylint==1.7.1
 commands =
-  pip install -e .[test]
-  {toxinidir}/run_pylint.sh
+  time pip install -e .[test]
+  time {toxinidir}/run_pylint.sh
 passenv = TRAVIS*
 
 [testenv:docs]
@@ -101,6 +101,6 @@ deps=
   Sphinx==1.5.5
   sphinx_rtd_theme==0.2.4
 commands =
-  pip install -e .[test,gcp,docs]
-  {toxinidir}/generate_pydoc.sh
+  time pip install -e .[test,gcp,docs]
+  time {toxinidir}/generate_pydoc.sh
 passenv = TRAVIS*


Mime
View raw message