Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: content/browser/devtools/devtools_tracing_handler.cc

Issue 434113002: Split trace messages into chunks based on size, not event count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_tracing_handler.cc
diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc
index 981c2047836269c9959959c32a324101ed73f4a1..0a3a7e71c244aa4fd073525e1cb2c7e8ce8ddedd 100644
--- a/content/browser/devtools/devtools_tracing_handler.cc
+++ b/content/browser/devtools/devtools_tracing_handler.cc
@@ -92,7 +92,8 @@ void DevToolsTracingHandler::ReadRecordingResult(
if (buffer.size())
buffer.append(",");
buffer.append(item);
- if (i % 1000 == 0) {
+ const size_t kMessageSizeThreshold = 1024 * 1024;
+ if (buffer.size() > kMessageSizeThreshold) {
OnTraceDataCollected(buffer);
buffer.clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698