From 774abdea86354c375e49061a78a997817c8d5b1d Mon Sep 17 00:00:00 2001 From: Kevin Jeon Date: Wed, 28 Sep 2022 18:20:43 +0000 Subject: Reduce timeouts for occasionally-stalling sections This change reduces the timeouts for INCIDENT REPORT and VISIBLE WINDOW VIEWS to 20s and 5s. This is because go/bugreport-durations shows that these sections occasionally stall to the full timeout (120s), but otherwise finish under 10s and 1s. This change should reduce the likelihood of these sections dramatically increasing the overall duration of a bug report. Test: Collect a bug report with 'adb bugreportz' to verify that the incident report and visible window views sections still exist. Bug: 249522178 Change-Id: Ie2d20cc0192bff892fdffc5e9bce84feba848553 --- cmds/dumpstate/dumpstate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds/dumpstate/dumpstate.cpp') diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 6dea91bc2b..25a50ddc4e 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1025,7 +1025,7 @@ static void DumpIncidentReport() { MYLOGE("Could not open %s to dump incident report.\n", path.c_str()); return; } - RunCommandToFd(fd, "", {"incident", "-u"}, CommandOptions::WithTimeout(120).Build()); + RunCommandToFd(fd, "", {"incident", "-u"}, CommandOptions::WithTimeout(20).Build()); bool empty = 0 == lseek(fd, 0, SEEK_END); if (!empty) { // Use a different name from "incident.proto" @@ -1063,7 +1063,7 @@ static void DumpVisibleWindowViews() { return; } RunCommandToFd(fd, "", {"cmd", "window", "dump-visible-window-views"}, - CommandOptions::WithTimeout(120).Build()); + CommandOptions::WithTimeout(10).Build()); bool empty = 0 == lseek(fd, 0, SEEK_END); if (!empty) { ds.AddZipEntry("visible_windows.zip", path); -- cgit v1.2.3-59-g8ed1b