Don't present testing results when rerun_budget_secs is set.

Presentation for rerun builders is taking a long time and has little
value. For example in this build, presentation took over 4 hours
(duration of "passes" + "flakes" steps):
https://luci-milo.appspot.com/p/turquoise/builders/global.rerun/fuchsia-x64-asan/b8890499862332887024

Bug: 39904
Change-Id: I7aea1dc5b77e8d1b2530fae1ae83f6612b2a2b68
diff --git a/recipe_modules/testing/api.py b/recipe_modules/testing/api.py
index 062457e..022f436 100644
--- a/recipe_modules/testing/api.py
+++ b/recipe_modules/testing/api.py
@@ -554,9 +554,15 @@
     self._collect_timeout = collect_timeout
     self._max_attempts = max_attempts
     launch_deadline_time = None
+    self._present = True
     if rerun_budget_secs:
       assert max_attempts == 1, (
           'If rerun_budget_secs is set, max_attempts should be set to 1')
+      # Presenting results is currently slow due to inefficiencies in
+      # the recipe engine. For builds that have rerun_budget_secs enabled,
+      # we only care about consuming the data after it's been uploaded, not
+      # from the Milo build page, so skip presentation.
+      self._present = False
       launch_deadline_time = self._api.time.time() + rerun_budget_secs
     self._swarming_output_dir = swarming_output_dir
 
@@ -590,7 +596,8 @@
         collect_timeout=self._collect_timeout,
     )
 
-    self._api.swarming_retry.present_tasks(tasks=self.tasks)
+    if self._present:
+      self._api.swarming_retry.present_tasks(tasks=self.tasks)
 
     return self.tasks
 
diff --git a/recipe_modules/testing/examples/full.expected/upload_to_catapult.json b/recipe_modules/testing/examples/full.expected/upload_to_catapult.json
index b9f53f7..921d096 100644
--- a/recipe_modules/testing/examples/full.expected/upload_to_catapult.json
+++ b/recipe_modules/testing/examples/full.expected/upload_to_catapult.json
@@ -1758,123 +1758,6 @@
   },
   {
     "cmd": [],
-    "name": "passes",
-    "~followup_annotations": [
-      "@@@STEP_SUMMARY_TEXT@1 passed@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "passes.Linux",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "passes.Linux.attempt 0 (pass)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_TEXT@1m 2s@@@",
-      "@@@STEP_LOG_LINE@summary.json@{@@@",
-      "@@@STEP_LOG_LINE@summary.json@  \"outputs\": {@@@",
-      "@@@STEP_LOG_LINE@summary.json@    \"goodbye-txt\": \"goodbye.txt\"@@@",
-      "@@@STEP_LOG_LINE@summary.json@  }, @@@",
-      "@@@STEP_LOG_LINE@summary.json@  \"tests\": [@@@",
-      "@@@STEP_LOG_LINE@summary.json@    {@@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"gn_label\": \"//path/to/hello:hello(//toolchain)\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"name\": \"hello\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"output_file\": \"hello.out\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"result\": \"PASS\"@@@",
-      "@@@STEP_LOG_LINE@summary.json@    }, @@@",
-      "@@@STEP_LOG_LINE@summary.json@    {@@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"gn_label\": \"//path/to/goodbye:goodbye(//toolchain)\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"name\": \"goodbye\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"output_file\": \"goodbye.out\", @@@",
-      "@@@STEP_LOG_LINE@summary.json@      \"result\": \"PASS\"@@@",
-      "@@@STEP_LOG_LINE@summary.json@    }@@@",
-      "@@@STEP_LOG_LINE@summary.json@  ]@@@",
-      "@@@STEP_LOG_LINE@summary.json@}@@@",
-      "@@@STEP_LOG_END@summary.json@@@",
-      "@@@STEP_LOG_LINE@symbolized log@hello world!@@@",
-      "@@@STEP_LOG_END@symbolized log@@@",
-      "@@@STEP_LOG_LINE@goodbye-txt@goodbye@@@",
-      "@@@STEP_LOG_END@goodbye-txt@@@",
-      "@@@STEP_LOG_LINE@syslog.txt@extra log contents@@@",
-      "@@@STEP_LOG_END@syslog.txt@@@",
-      "@@@STEP_LOG_LINE@serial.txt@extra log contents@@@",
-      "@@@STEP_LOG_END@serial.txt@@@",
-      "@@@STEP_LINK@swarming task@https://example.swarmingserver.appspot.com/task?id=0@@@",
-      "@@@STEP_LINK@task outputs@https://isolateserver.appspot.com/browse?namespace=default-gzip&hash=abc123@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "passes.Linux.attempt 0 (pass).all passed tests",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@",
-      "@@@STEP_TEXT@<br/>hello<br/>goodbye@@@",
-      "@@@STEP_SUMMARY_TEXT@2 passed tests@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "[CLEANUP]/swarming_tmp_2/0/syslog.txt",
-      "/path/to/tmp/"
-    ],
-    "infra_step": true,
-    "name": "passes.Linux.attempt 0 (pass).read syslog.txt",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@",
-      "@@@STEP_LOG_LINE@syslog.txt@extra log contents@@@",
-      "@@@STEP_LOG_END@syslog.txt@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "[CLEANUP]/swarming_tmp_2/0/serial.txt",
-      "/path/to/tmp/"
-    ],
-    "infra_step": true,
-    "name": "passes.Linux.attempt 0 (pass).read serial.txt",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@",
-      "@@@STEP_LOG_LINE@serial.txt@extra log contents@@@",
-      "@@@STEP_LOG_END@serial.txt@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "flakes",
-    "~followup_annotations": [
-      "@@@STEP_SUMMARY_TEXT@0 flaked@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "failures",
-    "~followup_annotations": [
-      "@@@STEP_SUMMARY_TEXT@0 failed@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "all tasks passed"
-  },
-  {
-    "cmd": [],
     "name": "upload Linux test results"
   },
   {