summaryrefslogtreecommitdiffstats
path: root/base/metrics
Commit message (Collapse)AuthorAgeFilesLines
* Use precisely sized integer types in histograms code.isherman2014-08-281-6/+8
| | | | | | | | | | BUG=none TEST=none R=asvitkine@chromium.org Review URL: https://codereview.chromium.org/511903003 Cr-Commit-Position: refs/heads/master@{#292340}
* Remove implicit conversions from scoped_refptr to T* in base/dcheng2014-08-271-42/+52
| | | | | | | | | | | This patch was generated by running the rewrite_scoped_refptr clang tool on a Linux build. BUG=110610 Review URL: https://codereview.chromium.org/510563002 Cr-Commit-Position: refs/heads/master@{#292050}
* Add LOCAL_ prefix to non-UMA histogram macros.asvitkine2014-08-267-169/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it harder to accidently use the wrong macro. Also, removes the D* variants of the macros and associated DebugNow() function. These were rarely used and removing them removes clutter from the header file. Existing uses converted to be behind NDEBUG ifdefs. No functional changes except for a fix to the code in content_based_thumbnailing_algorithm.cc which was incorrectly using a ternary operator for the histogram name (which doesn't work since the macros cache the histogram object) and removal of local histograms Spellcheck.SuggestTime and Spellcheck.InitTime per groby@. Since this is an API rename, TBR'ing downstream owners. BUG=311349 TBR=groby@chromium.org,zea@chromium.org,jeremy@chromium.org,reveman@chromium.org,agl@chromium.org,jam@chromium.org Review URL: https://codereview.chromium.org/484603006 Cr-Commit-Position: refs/heads/master@{#291840}
* Fixes for re-enabling more MSVC level 4 warnings: base/ editionpkasting@chromium.org2014-07-031-1/+3
| | | | | | | | | | | | | | | | | | | This contains fixes for the following sorts of issues: * Signedness mismatch * Assignment inside conditional * Nonstandard extension: unnamed struct/union * Octal escape sequence terminated by decimal number * Possibly-uninitialized local variable This also contains a very small number of other cleanups/simplifications to nearby code. BUG=81439 TEST=none Review URL: https://codereview.chromium.org/368133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281204 0039d316-1c4b-4281-b951-d872f2087c98
* [UMA] Fix a crash on logging user actions posted from a non-UI thread.isherman@chromium.org2014-04-102-15/+46
| | | | | | | | | | | | | Along the way, add DCHECKs to verify that user actions are always posted from the UI thread. BUG=360271 TEST=none R=asvitkine@chromium.org, avi@chromium.org Review URL: https://codereview.chromium.org/229873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262885 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the shared memory handle in to StatsTable rather than consulting the ↵brettw@chromium.org2014-04-083-71/+68
| | | | | | | | | | | | | | | | GlobaDescriptors. Remove the IPC dependency from base and updates the DEPS files to prevent this from happening again (ipc is in the root dir's deps file so is implicitly allowed here). The Chrome unit tests did a bunch of work to delete the stats file when running under Posix. But this filename is never used on Posix, so I deleted this code. The unit tests now use an anonymous stats table which this code now supports. The stats table unit test is disabled. It does not work on Posix systems at all because handle sharing is not set up. I put a Windows ifdef around this code (leaving it disabled) so I could use the Windows-style initializers, and verified that the test passes on Windows if I undisable it. R=jam@chromium.org Review URL: https://codereview.chromium.org/224713017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262540 0039d316-1c4b-4281-b951-d872f2087c98
* [UMA] Update documentation for running the extract_actions.py script.isherman@chromium.org2014-03-251-3/+4
| | | | | | | | | | BUG=none TEST=none R=asvitkine@chromium.org Review URL: https://codereview.chromium.org/206473008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259060 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 258395 "Add a death test to check field trial creation be..."benwells@chromium.org2014-03-211-11/+0
| | | | | | | | | | | | | | | | This caused memory errors on the linux and chromeos valgrind bots. > Add a death test to check field trial creation before FieldTrialList. > > BUG=123063 > > Review URL: https://codereview.chromium.org/206523002 TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/206473006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258464 0039d316-1c4b-4281-b951-d872f2087c98
* Add a death test to check field trial creation before FieldTrialList.asvitkine@chromium.org2014-03-201-0/+11
| | | | | | | | BUG=123063 Review URL: https://codereview.chromium.org/206523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258395 0039d316-1c4b-4281-b951-d872f2087c98
* Change DCHECK_IS_ON() to DCHECK_IS_ONwangxianzhu@chromium.org2014-03-141-1/+1
| | | | | | | | | | | | | | | DCHECK_IS_ON has been a constant since r255987, and can be used in both if() and #if. It no more needs to be in function form. Converted 'if (DCHECK_IS_ON)' to '#if DCHECK_IS_ON' if proper. BUG=350462 TEST=build TBR=darin Review URL: https://codereview.chromium.org/195973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257156 0039d316-1c4b-4281-b951-d872f2087c98
* Return a NULL histogram pointer on construction errorelijahtaylor@chromium.org2014-03-132-2/+46
| | | | | | | | | | Check the pointer returned for the metricsPrivate API to keep from crashing Chrome with bad data. BUG=334135 Review URL: https://codereview.chromium.org/141393002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256822 0039d316-1c4b-4281-b951-d872f2087c98
* Add Alexei as an OWNER for //base/metricsisherman@chromium.org2014-03-121-7/+2
| | | | | | | | | | BUG=none TEST=none R=asvitkine@chromium.org, jar@chromium.org Review URL: https://codereview.chromium.org/196213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256587 0039d316-1c4b-4281-b951-d872f2087c98
* [Metrics] Don't require clients of StatisticsDeltaReader to call ↵isherman@chromium.org2014-03-121-2/+1
| | | | | | | | | | | | | StatisticsRecorder::Initialize(). BUG=none TEST=none R=asvitkine@chromium.org TBR=willchan@chromium.org Review URL: https://codereview.chromium.org/184203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256495 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of multiprocess_test's debug_on_start arguments.viettrungluu@chromium.org2014-03-091-1/+1
| | | | | | | | | | | (It was only ever given a "true" value once, and even that seemed dubious.) R=phajdan.jr@chromium.org TBR=darin@chromium.org, jeremy@chromium.org Review URL: https://codereview.chromium.org/191483002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255801 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate named base::SharedMemory.viettrungluu@chromium.org2014-03-051-1/+1
| | | | | | | | | | | | | It's hardly used and not implemented on various platforms. (More deprecation work here to come.) R=brettw@chromium.org TBR=sky@chromium.org BUG=345734 Review URL: https://codereview.chromium.org/186473002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255148 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate base::SharedMemory's lock functionality.viettrungluu@chromium.org2014-02-241-2/+3
| | | | | | | | | | BUG=345734 R=brettw@chromium.org TBR=jar@chromium.org Review URL: https://codereview.chromium.org/175183004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252933 0039d316-1c4b-4281-b951-d872f2087c98
* Make code generated for histogram macros more compact.asvitkine@chromium.org2014-02-153-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | In builds where DCHECKs are compiled in (e.g. developer builds and Chrome Canaries), the DCHECK_EQ() in the histogram macro was expanding to a lot of generated machine code. This CL moves that DCHECK() to a function instead, so that the code is not duplicated in every call site. The function call is wrapped behind a DCHECK_IS_ON() conditional, so that it will still be omitted if DCHECKs are not compiled into the build. Makes my Chromium release build smaller by over 1MB, measuring size of Chromium Framework. Before size: 146547380 After size: 145400692 BUG=343946 TEST=No functional changes. Review URL: https://codereview.chromium.org/167343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251486 0039d316-1c4b-4281-b951-d872f2087c98
* Make some field trials unforceable via command-line in the official build.gab@chromium.org2014-02-133-16/+77
| | | | | | | | | | | | | BUG=342585 TEST=Remove the OFFICIAL_BUILD ifdefs and: 1) Confirm that running with --force-fieldtrials with an unforceable experiment and a forceable one only forces the forceable one. 2) Confirm that the value which couldn't be forced in the browser also makes it unforced in the renderer. Put the OFFICIAL_BUILD ifdefs back and confirm that unforceable experiments are still forceable in non-official builds. Review URL: https://codereview.chromium.org/153913009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250988 0039d316-1c4b-4281-b951-d872f2087c98
* Let MetricsService know about some Android Activitieskkimlabs@chromium.org2014-02-117-19/+148
| | | | | | | | | | | | | | | | | To tune our crash states more finely, we need to track which Activity is in the foreground when Chrome is killed. Add piping to let MetricsService know when Activities are swapped in and out by the user. The CL makes MetricsService track how many times particular Activities have been launched, as well as how often Chrome was improperly closed while one of these Activities was in the foreground (i.e. crashed). These numbers are concatenated into a histogram, which is then sent to the server. BUG=321346 Review URL: https://codereview.chromium.org/137623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250410 0039d316-1c4b-4281-b951-d872f2087c98
* Change the operations touching counts_[] and redundant_count_ to be atomic.glider@chromium.org2014-01-215-18/+34
| | | | | | | | | | | This will make it explicit that the counters are accessed without synchronization and will also suppress TSan v2 warnings. BUG=46840 R=jar@chromium.org,kaiwang@chromium.org Review URL: https://codereview.chromium.org/116983004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245997 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor base/safe_numerics.hjschuh@chromium.org2014-01-171-2/+2
| | | | | | | | | | | | | | | * Move into base/numerics subdirectory. * Rename files for clarity. * Add owners. * Rename checked_numeric_cast to checked_cast. * Fixup callsites and include paths. BUG=332611 R=brettw@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/141113003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245418 0039d316-1c4b-4281-b951-d872f2087c98
* Move the guts of user_metrics to a new static lib in //base/metrics.ben@chromium.org2014-01-133-0/+130
| | | | | | | | | | | I retained a couple of wrapper functions in content that post back to the UI thread if they are called from another thread. All existing code will continue to use these wrappers. The intent is that some code that I don't want to depend on content that only lives on the UI thread can now call //base/metrics code directly. R=isherman@chromium.org, jam@chromium.org http://crbug.com/332504 Review URL: https://codereview.chromium.org/129223004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244580 0039d316-1c4b-4281-b951-d872f2087c98
* Add a StatisticsDeltaReader class and use caseslpromero@chromium.org2014-01-071-3/+4
| | | | | | | | | | | | | | | | | This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the StatisticsDeltaReader class allows a client to obtain the differential value of a given histogram in the interval since the given StatisticsDeltaReader instance was created. This reverts commit 6a7dfb3cd638829a04e002ea9bc5b18ed3c9c03f. BUG=232414 TBR=rsleevy, groby Review URL: https://codereview.chromium.org/120753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 242121 "Reland "Add a HistogramRecorder class and use cas..."groby@chromium.org2013-12-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per request from lpromero, reverting since it might be failing a test - see http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Tests%20%28tsan%29/builds/17153/steps/memory%20test%3A%20base_unittests/logs/stdio [ RUN ] HistogramTest.BasicTest [3824:2780:1220/111332:4747750:FATAL:statistics_recorder.cc(270)] Check failed: !histograms_. TBR=lpromero@chromium.org > Reland "Add a HistogramRecorder class and use cases." > > This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the HistogramRecorder class allows a client to obtain the differential value of a given histogram in the interval since the given HistogramRecorder instance was created. > > This reverts commit b957026f43ef9464a8cdd5a240867c807b2281da. > > BUG=232414 > TBR=rsleevi, mark, groby, thakis > > Review URL: https://codereview.chromium.org/19866004 TBR=lpromero@chromium.org Review URL: https://codereview.chromium.org/120273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242176 0039d316-1c4b-4281-b951-d872f2087c98
* Rename base::FieldTrialList::RegistrationList --> RegistrationMap.gavinp@chromium.org2013-12-202-5/+5
| | | | | | | | | | | The typedef confused me when I was reading the code, so here I am, fixing it. BUG=None R=jar@chromium.org Review URL: https://codereview.chromium.org/120013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242143 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Add a HistogramRecorder class and use cases."lpromero@chromium.org2013-12-201-3/+3
| | | | | | | | | | | | | This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the HistogramRecorder class allows a client to obtain the differential value of a given histogram in the interval since the given HistogramRecorder instance was created. This reverts commit b957026f43ef9464a8cdd5a240867c807b2281da. BUG=232414 TBR=rsleevi, mark, groby, thakis Review URL: https://codereview.chromium.org/19866004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242121 0039d316-1c4b-4281-b951-d872f2087c98
* Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter.rsesek@chromium.org2013-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JSONReader only accepts UTF-8 input strings and converts \uXXXX sequences back into UTF-8. However, the JSONWriter converts all non-ASCII characters to UTF-16 escape sequences. This round-tripping is sub-optimal, as noted in a TODO from r54359. One reason for this may be that JsonDoubleQuote(), used by JSONWriter, does not handle UTF-8 bytes correctly, interpreting them as code points and writing them out as \u00XX sequences. If this were read back through a RFC-compliant JSON parser, the result would be an invalid encoding error. JsonDoubleQuote() does handle UTF-16 correctly, though. This rewrites the base/json/string_escape.h API and fixes the above UTF-8 issue by dividing callers up into three groups: 1. Those that pass valid UTF-8 to be escaped. Prior to this change, very few callers used this variant. Those that did were likely using ASCII, otherwise the output would be mangled due to the above issue. Now, valid UTF-8 will be passed through to the output unescaped. Invalid UTF-8 sequences are replaced with U+FFFD. 2. Those that pass valid UTF-16 to be escaped. This function now validates that the input is valid UTF-16, and then converts it to unescaped UTF-8 sequences for the output. 3. Those that pass arbitrary byte arrays as std::string and expect a non-RFC- compliant encoding of the binary data using \uXXXX escapes. This behavior is now in the EscapeBytesAsInvalidJSONString() function. It is only used by callers who want a "debug string" but do not expect to actually parse the output as valid JSON, since it is not. Additionally, this removes the JSONWriter::OPTIONS_DO_NOT_ESCAPE flag, since the writer can now handle UTF-8 appropriately. BUG=15466 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239800 Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=240082 R=asanka@chromium.org, bauerb@chromium.org, mark@chromium.org, thakis@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/100823007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240190 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/100823007/antrim@chromium.org2013-12-111-1/+1
| | | | | | | | | | | | Reason for revert: This patchset breaks at least displayment of Russian localized strings on Chromeos login screen. TBR=mark@chromium.org,jshin@chromium.org,thakis@chromium.org,asanka@chromium.org,zea@chromium.org,bauerb@chromium.org,rsesek@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/106793004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240082 0039d316-1c4b-4281-b951-d872f2087c98
* Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter.rsesek@chromium.org2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JSONReader only accepts UTF-8 input strings and converts \uXXXX sequences back into UTF-8. However, the JSONWriter converts all non-ASCII characters to UTF-16 escape sequences. This round-tripping is sub-optimal, as noted in a TODO from r54359. One reason for this may be that JsonDoubleQuote(), used by JSONWriter, does not handle UTF-8 bytes correctly, interpreting them as code points and writing them out as \u00XX sequences. If this were read back through a RFC-compliant JSON parser, the result would be an invalid encoding error. JsonDoubleQuote() does handle UTF-16 correctly, though. This rewrites the base/json/string_escape.h API and fixes the above UTF-8 issue by dividing callers up into three groups: 1. Those that pass valid UTF-8 to be escaped. Prior to this change, very few callers used this variant. Those that did were likely using ASCII, otherwise the output would be mangled due to the above issue. Now, valid UTF-8 will be passed through to the output unescaped. Invalid UTF-8 sequences are replaced with U+FFFD. 2. Those that pass valid UTF-16 to be escaped. This function now validates that the input is valid UTF-16, and then converts it to unescaped UTF-8 sequences for the output. 3. Those that pass arbitrary byte arrays as std::string and expect a non-RFC- compliant encoding of the binary data using \uXXXX escapes. This behavior is now in the EscapeBytesAsInvalidJSONString() function. It is only used by callers who want a "debug string" but do not expect to actually parse the output as valid JSON, since it is not. Additionally, this removes the JSONWriter::OPTIONS_DO_NOT_ESCAPE flag, since the writer can now handle UTF-8 appropriately. BUG=15466 Review URL: https://codereview.chromium.org/100823007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239800 0039d316-1c4b-4281-b951-d872f2087c98
* Move std::string instance inside of loop.grt@chromium.org2013-11-211-2/+1
| | | | | | | | | | | This is a followup change to r235191 resulting from a chromium-dev discussion. BUG=None Review URL: https://codereview.chromium.org/78593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236447 0039d316-1c4b-4281-b951-d872f2087c98
* Fix multiples typos while reading histogram.etienneb@chromium.org2013-11-201-5/+5
| | | | | | | | | R=isherman@chromium.org BUG= Review URL: https://codereview.chromium.org/76543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236206 0039d316-1c4b-4281-b951-d872f2087c98
* Add a switch to emit browser histograms.grt@chromium.org2013-11-143-3/+102
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/61983003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235191 0039d316-1c4b-4281-b951-d872f2087c98
* Update order of FieldTrial functions.asvitkine@chromium.org2013-10-302-29/+29
| | | | | | | | | | | | | | Puts the static functions together and moves the constructor to be in the same order in the .cc file as in the .h file. No logic changes. BUG=none Review URL: https://codereview.chromium.org/51233003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231798 0039d316-1c4b-4281-b951-d872f2087c98
* Add static FieldTrial::CreateSimulatedFieldTrial function.asvitkine@chromium.org2013-10-293-4/+91
| | | | | | | | | | | | | | This allows creating a field trial not associated with the global field trial list, e.g. to simulate group assignment without affecting global state. See associated bug for more detailed motivation. BUG=281474 TEST=New unit tests. Review URL: https://codereview.chromium.org/23503019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231612 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate serialization code in base::HistogramDeltasSerializervitalybuka@chromium.org2013-10-237-52/+233
| | | | | | | | | | Before patch code lived partially in base/ and content/ BUG=305019 Review URL: https://codereview.chromium.org/27460003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230268 0039d316-1c4b-4281-b951-d872f2087c98
* Pass StatsTable shared memory via global descriptors on Posix rather than ↵rmcilroy@chromium.org2013-10-162-64/+114
| | | | | | | | | | | | | | using named shared memory. This is required for to enable chrome://stats Android where there is no /dev/shm. This also provides the added advantage of not requiring the --no-sandbox command line flag with the --enable-stats-table on Posix. BUG=None Review URL: https://codereview.chromium.org/22911027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228903 0039d316-1c4b-4281-b951-d872f2087c98
* Use TotalCount not redundant_count to determine if to call RecordDeltaccameron@chromium.org2013-10-161-1/+1
| | | | | | | | | | | | RecordDelta asserts that TotalCount() > 0, but the caller checks that redundant_count() > 0. The comments around redundant_count() suggest that it need not always equal TotalCount(). BUG=174764 Review URL: https://codereview.chromium.org/26925006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228888 0039d316-1c4b-4281-b951-d872f2087c98
* FieldTrial: Remove friend declarations for non-existing testsvabr@chromium.org2013-09-261-3/+0
| | | | | | | | | | | | | | The tests were removed in https://codereview.chromium.org/10151017 and https://codereview.chromium.org/10830318 but are still referenced as friends. BUG=143239 Review URL: https://codereview.chromium.org/24571002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225445 0039d316-1c4b-4281-b951-d872f2087c98
* Fix inconsistent FieldTrial group assignment due to float errors.asvitkine@chromium.org2013-09-193-3/+52
| | | | | | | | | | | | | This was discovered by the InstantExtended field trial that was using very small group percentages and discovered several groups of the same size were getting different user counts. BUG=290438 TEST=New unit test that fails without the fix. Review URL: https://chromiumcodereview.appspot.com/23710041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224011 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable pre-read experiment as a finch field trial.rogerm@chromium.org2013-09-131-0/+6
| | | | | | | | | | | This CL revives an expired pre-read experiment as a Finch field trial. About 2 months ago the expired experiment, and its fallback behaviour, were removed and there was a subsequent performance regression. R=cpu, asvitkine BUG=245435, 280721 Review URL: https://chromiumcodereview.appspot.com/23534009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223070 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land https://codereview.chromium.org/23602005: Use nobarrier atomics for ↵glider@chromium.org2013-09-043-4/+7
| | | | | | | | | | | | | | lossy counters in base::HistogramSamples and base::SampleVector This should not affect the performance, but will make it explicit that the counter values are expected to be read and written atomically. This will also suppress the ThreadSanitizer v2 reports on these counters. BUG=46840 TBR=jar@chromium.org Review URL: https://codereview.chromium.org/23450016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221183 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 221168 "Use nobarrier atomics for platform-size lossy cou..."glider@chromium.org2013-09-043-6/+4
| | | | | | | | | | | | | | | | | > Use nobarrier atomics for platform-size lossy counters in base::HistogramSamples and base::SampleVector > This should not affect the performance, but will make it explicit that the counter values are expected to be read and written atomically. > This will also suppress the ThreadSanitizer v2 reports on these counters. > > BUG=46840 > R=jar@chromium.org > > Review URL: https://codereview.chromium.org/23602005 TBR=glider@chromium.org Review URL: https://codereview.chromium.org/23888004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221170 0039d316-1c4b-4281-b951-d872f2087c98
* Use nobarrier atomics for platform-size lossy counters in ↵glider@chromium.org2013-09-043-4/+6
| | | | | | | | | | | | | | base::HistogramSamples and base::SampleVector This should not affect the performance, but will make it explicit that the counter values are expected to be read and written atomically. This will also suppress the ThreadSanitizer v2 reports on these counters. BUG=46840 R=jar@chromium.org Review URL: https://codereview.chromium.org/23602005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221168 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated FieldTrial::MakeName() API.asvitkine@chromium.org2013-09-033-42/+0
| | | | | | | | | | | | | This API was deprecated when we started tagging UMA reports with field trial information and no longer has any users. BUG=229940 TEST=compiles Review URL: https://chromiumcodereview.appspot.com/23572012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220957 0039d316-1c4b-4281-b951-d872f2087c98
* Fix off-by-one error in StatsTable::GetRowValue().rmcilroy@chromium.org2013-08-281-2/+2
| | | | | | | | | | | Slot_id's are 1 more than the indexes into the arrays (e.g., see StatsTable::GetLocation). BUG= Review URL: https://chromiumcodereview.appspot.com/23346012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220004 0039d316-1c4b-4281-b951-d872f2087c98
* Make field trial randomization type a constructor param.asvitkine@chromium.org2013-07-303-172/+157
| | | | | | | | | | | | | | | | | | | | | Changes the Field Trial API to require users to pass ONE_TIME_RANDOMIZED or SESSION_RANDOMIZED at the time the field trial is created. This removes a source of human errors, where developers would sometimes previously forget to call UseOneTimeRandomization() in their CLs. It's a small startup performance win, since one time randomized trials will no longer call RandDouble() that will be then replaced by a value from the entropy provider. (This was showing up in profiles when I was measuring metrics startup perf on mobile.) BUG=262971 TEST=Existing unit tests. TBR=isherman@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/20777005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214352 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths in base for base/process changes.rsesek@chromium.org2013-07-253-2/+3
| | | | | | | | | | | | | | This also updates any stragglers that I missed, fixes mistakes I may have made, and deletes the forwarding headers. After this CL, the proces_util.h project is complete. BUG=242290 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/20265004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213702 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 212378 "Add a HistogramRecorder class and use cases."rnk@chromium.org2013-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | This code exhibits addressability bugs under valgrind: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/26205 Please investigate and reland with a clean valgrind trybot run. > Add a HistogramRecorder class and use cases. > > This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the HistogramRecorder class allows a client to obtain the differential value of a given histogram in the interval since the given HistogramRecorder instance was created. > > BUG=232414 > > Review URL: https://chromiumcodereview.appspot.com/18337014 TBR=lpromero@chromium.org Review URL: https://codereview.chromium.org/19722009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212419 0039d316-1c4b-4281-b951-d872f2087c98
* Add a HistogramRecorder class and use cases.lpromero@chromium.org2013-07-181-3/+3
| | | | | | | | | | This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the HistogramRecorder class allows a client to obtain the differential value of a given histogram in the interval since the given HistogramRecorder instance was created. BUG=232414 Review URL: https://chromiumcodereview.appspot.com/18337014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212378 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in base/.avi@chromium.org2013-07-181-1/+1
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19224003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212281 0039d316-1c4b-4281-b951-d872f2087c98