Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/framework/profiler.py b/framework/profiler.py
index 362585f..61e5092 100644
--- a/framework/profiler.py
+++ b/framework/profiler.py
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
 
 """A simple profiler object to track how time is spent on a request.
 
@@ -156,14 +155,14 @@
     self.ms = int(self.elapsed_seconds * 1000)
     for sub in self.subphases:
       if sub.elapsed_seconds is None:
-        logging.warn('issue3182: subphase is %r', sub and sub.name)
+        logging.warning('issue3182: subphase is %r', sub and sub.name)
     categorized = sum(sub.elapsed_seconds or 0.0 for sub in self.subphases)
     self.uncategorized_ms = int((self.elapsed_seconds - categorized) * 1000)
     return self.parent
 
   def AccumulateStatLines(self, total_seconds, lines, indent=''):
     # Only phases that took longer than 30ms are interesting.
-    if self.ms <= 30:
+    if self.ms == 'in_progress' or self.ms <= 30:
       return
 
     percent = self.elapsed_seconds // total_seconds * 100