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

Side by Side Diff: chrome/browser/metrics/metrics_service.cc

Issue 313613003: Increase "log too large" threshold in MetricsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It is 10 // A MetricsService instance is typically created at application startup. It is
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 const int kInitializationDelaySeconds = 30; 240 const int kInitializationDelaySeconds = 30;
241 #endif 241 #endif
242 242
243 // The maximum number of events in a log uploaded to the UMA server. 243 // The maximum number of events in a log uploaded to the UMA server.
244 const int kEventLimit = 2400; 244 const int kEventLimit = 2400;
245 245
246 // If an upload fails, and the transmission was over this byte count, then we 246 // If an upload fails, and the transmission was over this byte count, then we
247 // will discard the log, and not try to retransmit it. We also don't persist 247 // will discard the log, and not try to retransmit it. We also don't persist
248 // the log to the prefs for transmission during the next chrome session if this 248 // the log to the prefs for transmission during the next chrome session if this
249 // limit is exceeded. 249 // limit is exceeded.
250 const size_t kUploadLogAvoidRetransmitSize = 50000; 250 const size_t kUploadLogAvoidRetransmitSize = 250000;
Ilya Sherman 2014/06/03 19:51:49 This limit is now very close to kStorageByteLimitP
Ilya Sherman 2014/06/03 19:51:49 Optional nit: This might be a little easier to int
Ilya Sherman 2014/06/03 19:51:49 What is actually accounting for the larger size of
Alexei Svitkine (slow) 2014/06/03 19:56:45 I'm not sure when the old value was chosen or how
Ilya Sherman 2014/06/03 20:25:19 I agree that dropping lots of logs is quite bad, a
251 251
252 // Interval, in minutes, between state saves. 252 // Interval, in minutes, between state saves.
253 const int kSaveStateIntervalMinutes = 5; 253 const int kSaveStateIntervalMinutes = 5;
254 254
255 // The metrics server's URL. 255 // The metrics server's URL.
256 const char kServerUrl[] = "https://clients4.google.com/uma/v2"; 256 const char kServerUrl[] = "https://clients4.google.com/uma/v2";
257 257
258 // The MIME type for the uploaded metrics data. 258 // The MIME type for the uploaded metrics data.
259 const char kMimeType[] = "application/vnd.chrome.uma"; 259 const char kMimeType[] = "application/vnd.chrome.uma";
260 260
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 RecordCurrentState(local_state_); 1331 RecordCurrentState(local_state_);
1332 } 1332 }
1333 1333
1334 void MetricsService::RecordCurrentState(PrefService* pref) { 1334 void MetricsService::RecordCurrentState(PrefService* pref) {
1335 pref->SetInt64(prefs::kStabilityLastTimestampSec, Time::Now().ToTimeT()); 1335 pref->SetInt64(prefs::kStabilityLastTimestampSec, Time::Now().ToTimeT());
1336 1336
1337 #if defined(ENABLE_PLUGINS) 1337 #if defined(ENABLE_PLUGINS)
1338 plugin_metrics_provider_->RecordPluginChanges(); 1338 plugin_metrics_provider_->RecordPluginChanges();
1339 #endif 1339 #endif
1340 } 1340 }
OLDNEW
« 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