Add perf.py option to skip GCS upload

Change-Id: I7fc5e5e31eb3270fcd02731e691ebf0535e80ee3
diff --git a/tools/internal_test.py b/tools/internal_test.py
index 3158420..555259f 100755
--- a/tools/internal_test.py
+++ b/tools/internal_test.py
@@ -117,7 +117,10 @@
         '--java_max_memory_size=8G'
     ],
     # Run internal benchmarks.
-    ['tools/perf.py', '--internal', '--iterations-inner', '3'],
+    [
+        'tools/perf.py', '--internal', '--iterations-inner', '3',
+        '--no-upload-benchmark-data-to-google-storage'
+    ],
     # Ensure that all internal apps compile.
     ['tools/run_on_app.py', '--run-all', '--out=out', '--workers', '3'],
 ]
diff --git a/tools/perf.py b/tools/perf.py
index 1bc66aa..d63fe1d 100755
--- a/tools/perf.py
+++ b/tools/perf.py
@@ -89,12 +89,13 @@
 }
 # A collection of internal benchmarks that should be run on the internal bot.
 INTERNAL_BENCHMARKS = {
-    'SystemUIApp': {'targets': ['r8-full']},
+    'SystemUIApp': {
+        'targets': ['r8-full']
+    },
 }
 # A collection of benchmarks that should not be run on the bots, but can be used
 # for running locally.
-LOCAL_BENCHMARKS = {
-    'SystemUIAppTreeShaking': {'targets': ['r8-full']}}
+LOCAL_BENCHMARKS = {'SystemUIAppTreeShaking': {'targets': ['r8-full']}}
 ALL_BENCHMARKS = {}
 ALL_BENCHMARKS.update(EXTERNAL_BENCHMARKS)
 ALL_BENCHMARKS.update(INTERNAL_BENCHMARKS)
@@ -131,6 +132,10 @@
                         help='How many iterations to run inside run_benchmark.',
                         type=int,
                         default=10)
+    result.add_argument('--no-upload-benchmark-data-to-google-storage',
+                        help='Skip upload to GCS.',
+                        action='store_true',
+                        default=False)
     result.add_argument('--outdir',
                         help='Output directory for running locally.')
     result.add_argument('--skip-if-output-exists',
@@ -352,7 +357,8 @@
                                       outdir=options.outdir)
 
     # Only upload benchmark data when running on the perf bot.
-    if utils.is_bot() and not options.internal:
+    if utils.is_bot(
+    ) and not options.no_upload_benchmark_data_to_google_storage:
         upload_benchmark_data_to_google_storage.run_bucket()
 
     if any_failed: