Commit Graph

70 Commits

Author SHA1 Message Date
Jan-Erik Rediger
c22b419c66 Bug 1470897 - Catch invalid data, show a warning and continue processing. r=chutten
MozReview-Commit-ID: GbbBarULSOR

Differential Revision: https://phabricator.services.mozilla.com/D1951
2018-07-04 19:14:51 +00:00
Jan-Erik Rediger
b088cc3199 Bug 1466490 - Actually record non-main scalars on the main process after deserialization/recording. r=Dexter
MozReview-Commit-ID: HNGq5kVVc3k
2018-06-14 16:03:33 -07:00
Cosmin Sabou
7529a0435b Backed out 3 changesets (bug 1466490) for ESlint failures on test_GeckoView_ScalarSemantics. CLOSED TREE
Backed out changeset 5f13ed9de8a3 (bug 1466490)
Backed out changeset 95048dd368eb (bug 1466490)
Backed out changeset e3891caf027f (bug 1466490)
2018-06-15 22:34:01 +03:00
Jan-Erik Rediger
bfff8b7373 Bug 1466490 - Actually record non-main scalars on the main process after deserialization/recording. r=Dexter
MozReview-Commit-ID: HNGq5kVVc3k
2018-06-14 16:03:33 -07:00
Jan-Erik Rediger
fe29fb1fce Bug 1465052 - Record when the high-water mark for pending operations is hit. r=Dexter
MozReview-Commit-ID: L3GnUTXHf3C
2018-06-04 12:34:26 +02:00
Jan-Erik Rediger
63b9ef5a56 Bug 1454606 - Record scalar operations and apply operations after load. r=Dexter
In order to preserve semantics of scalar operations, we defer applying
operations on probes until after the persisted measurements are fully loaded.
This is only necessary on GeckoView, as it is the only product doing intermediate persistence of measurements.

MozReview-Commit-ID: IHA1MGPRHoQ
2018-05-18 15:09:16 +02:00
Gurzau Raul
968f272529 Backed out 3 changesets (bug 1454606) for assert failure on /build/src/obj-firefox/dist/include/js/Value.h
Backed out changeset bac711e0ab42 (bug 1454606)
Backed out changeset 1df93e12f6ec (bug 1454606)
Backed out changeset b126c9d96aaf (bug 1454606)
2018-05-30 17:45:01 +03:00
Jan-Erik Rediger
7de9cfcd85 Bug 1454606 - Record scalar operations and apply operations after load. r=Dexter
In order to preserve semantics of scalar operations, we defer applying
operations on probes until after the persisted measurements are fully loaded.
This is only necessary on GeckoView, as it is the only product doing intermediate persistence of measurements.

MozReview-Commit-ID: IHA1MGPRHoQ
2018-05-18 15:09:16 +02:00
Gurzau Raul
1d481dba50 Backed out 3 changesets (bug 1454606) for bustage on /toolkit/components/telemetry/TelemetryScalar.cpp on a CLOSED TREE
Backed out changeset 6be2c9f129c9 (bug 1454606)
Backed out changeset 114fd49040b6 (bug 1454606)
Backed out changeset 2889aa95e455 (bug 1454606)
2018-05-30 13:55:37 +03:00
Jan-Erik Rediger
1930d05157 Bug 1454606 - Record scalar operations and apply operations after load. r=Dexter
In order to preserve semantics of scalar operations, we defer applying
operations on probes until after the persisted measurements are fully loaded.
This is only necessary on GeckoView, as it is the only product doing intermediate persistence of measurements.

MozReview-Commit-ID: IHA1MGPRHoQ
2018-05-18 15:09:16 +02:00
Alessio Placitelli
17a1884f63 Bug 1459144 - Add gtest coverage for GeckoView measurements' persistence. r=janerik
This patch changes GeckoView persistence code so that it will always get compiled
and linked to the final executable, even outside of Android. By doing so, we are
able to easily add gtest coverage for this code on all platforms other than Android
on which gtest is not yet supported.
In addition to that, this patch adds proper test cases for measurements' serialization
and deserialization for both scalars and histograms.

MozReview-Commit-ID: J0Snhl3Y8jk
2018-05-22 17:15:33 +02:00
Alessio Placitelli
de65f709de Bug 1453591 - Add gtest coverage for the persistence logic. r=chutten,froydnj,janerik
This changes the build system to add a new define when on
Android or when tests are enabled, MOZ_TELEMETRY_GECKOVIEW.

MozReview-Commit-ID: 5n2A8G2ZzRK
2018-04-23 19:14:23 +02:00
Alessio Placitelli
90682a495f Bug 1453591 - Add GeckoView persistence for Telemetry Scalars. r=bz,chutten,gfritzsche
This adds the core changes needed in order to record scalar measurements
to a file and then load them back (including keyed scalars).

MozReview-Commit-ID: BQh2KWzjvLu
2018-04-23 16:22:58 +02:00
Cosmin Sabou
9b145c921e Backed out 5 changesets (bug 1453591) for build bustages on TelemetryGeckoViewPersistence.cpp. CLOSED TREE
Backed out changeset 6bd51139f05a (bug 1453591)
Backed out changeset f128be7d5256 (bug 1453591)
Backed out changeset e5cf4d14019f (bug 1453591)
Backed out changeset 47634ee93be3 (bug 1453591)
Backed out changeset 8e56f01b7ae4 (bug 1453591)
2018-05-14 22:56:28 +03:00
Alessio Placitelli
f359c749f4 Bug 1453591 - Add gtest coverage for the persistence logic. r=chutten,froydnj,janerik
This changes the build system to add a new define when on
Android or when tests are enabled, MOZ_TELEMETRY_GECKOVIEW.

MozReview-Commit-ID: 5n2A8G2ZzRK
2018-04-23 19:14:23 +02:00
Alessio Placitelli
51dfaae31c Bug 1453591 - Add GeckoView persistence for Telemetry Scalars. r=bz,chutten,gfritzsche
This adds the core changes needed in order to record scalar measurements
to a file and then load them back (including keyed scalars).

MozReview-Commit-ID: BQh2KWzjvLu
2018-04-23 16:22:58 +02:00
Jan-Erik Rediger
0f13fbcf9d Bug 1452552 - Add "products" property to scalars. r=Dexter
The "products" property is optional and defaults to `firefox, fennec`.
Recording of scalars is disabled if the probe doesn't have the products
property for the current running product.

MozReview-Commit-ID: 4HVBrBw1lls
2018-04-23 17:07:47 +02:00
Michael Calabrese
6a719428fe Bug 1450098 - Rewrote part of TelemetryScalars' internal_LogScalarError to use nsPrintfCString and defined variables instead of constants; r=Dexter
MozReview-Commit-ID: 7UcLZEk0HCI
2018-04-16 17:17:53 -04:00
Chris H-C
208211ef1b bug 1440673 - Summarize dynamic events to a dynamic scalar r=Dexter
MozReview-Commit-ID: KD9ADGJZZCM
2018-03-29 14:28:50 -04:00
Chris H-C
53e17d0199 bug 1440673 - Set the max number of event summary keys by pref r=Dexter
Introducing the pref toolkit.telemetry.maxEventSummaryKeys which we should
hopefully never have to think about because (and yes, I risk being quoted in
future for this):

500 unique event names per process ought to be enough.

We check the preference just once but have to set it each time as the
KeyedScalar object may have been recreated while we weren't looking.

MozReview-Commit-ID: 8IE9dcfuynh
2018-03-28 13:58:33 -04:00
Chris H-C
8c746ff43f bug 1440673 - Allow changing the max number of keys per-keyed-scalar r=Dexter
I considered a few different ways to do this, but storing the limit inside the
KeyedScalar itself was the cleanest. The limit check is too deep to pass it as
an argument, and making it conditional on the keyed scalar being called
"telemetry.event_counts" was too fragile.

MozReview-Commit-ID: AyfEKB40Abb
2018-03-28 13:45:07 -04:00
Chris H-C
5b15bc62e2 bug 1440673 - Summarize events to a keyed scalar r=Dexter
Telemetry Events will now be counted in the keyed scalar
"telemetry.event_counts" even if their category is not enabled for recording.

The keys will be category#method#object and a follow-up commit will expand the
process limit of the number of these from 100 to 500, configurable by pref.

Unfortunately Event Telemetry needs a special API so that an event recorded in
multiple processes will be summarized to those processes separately.

MozReview-Commit-ID: 7dKcM3SXO6r
2018-03-16 15:56:16 -04:00
Chris H-C
c5ec6dbc9b bug 1440673 - Allow scalar keys to be an extra 2 chars long r=Dexter
This allows us to store Telemetry Event category (30), method (20),
object (20), and two delimiters (2) in a single key, like so:

oohwowlookthiscategoryissolong#thismethodislongtooo#thisobjectisnoslouch

MozReview-Commit-ID: BkoU1VAXFF9
2018-03-27 16:15:27 -04:00
Chris H-C
9fa31b0c25 bug 1440673 - Fix off-by-one errors in keyed scalars r=Dexter
The maximum key length constraint should be strict greater-than, and the
maximum number of keys constraint should only be checked if we are creating a
new key.

MozReview-Commit-ID: 5fhfV8BbmRH
2018-03-27 16:59:15 -04:00
Chris Peterson
6758bf6a84 Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D
2018-02-05 22:46:57 -08:00
Alessio Placitelli
eb7a868f0c Bug 1425909 - Enable adding scalars in artifact builds without rebuilding Firefox. r=chutten,froydnj
This patch enables generating a JSON file that mirrors the scalar definitions
in Scalars.yaml. On local developer builds, this file is loaded when Firefox
starts to register all the scalars. If some change was introduced in the
definition files, the new scalar will be dynamically added.
The JSON definition file will be regenerated every time an artifact build
is performed or the build faster command is invoked.

MozReview-Commit-ID: Do3WjE38aIK
2018-01-18 18:25:01 +01:00
Narcis Beleuzu
d49844a6e2 Backed out 2 changesets (bug 1425909) for mochitest C3 failures on test_memoryReporters.xul. on a CLOSED TREE
Backed out changeset 6bcaae60c82e (bug 1425909)
Backed out changeset 0b5d96b317c3 (bug 1425909)
2018-02-01 19:45:22 +02:00
Alessio Placitelli
7f5273e816 Bug 1425909 - Enable adding scalars in artifact builds without rebuilding Firefox. r=chutten,froydnj
This patch enables generating a JSON file that mirrors the scalar definitions
in Scalars.yaml. On local developer builds, this file is loaded when Firefox
starts to register all the scalars. If some change was introduced in the
definition files, the new scalar will be dynamically added.
The JSON definition file will be regenerated every time an artifact build
is performed or the build faster command is invoked.

MozReview-Commit-ID: Do3WjE38aIK
2018-01-18 18:25:01 +01:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
Alessio Placitelli
d9ee9ffc5f Bug 1409323 - Allow to register new addon scalars for an existing category. r=chutten
If we attempt to register again an old dynamic scalar, check if the new
definition makes it expired. If so, update the expiration state and propagate
the new "expired" scalar to the content proecesses.

MozReview-Commit-ID: A2LFN1irw4i
2017-10-17 16:00:12 +02:00
Fernando
35f250e29e Bug 1362957 - Refactor lock-protected TelemetryScalar code. r=Dexter 2017-10-15 05:42:00 -04:00
Alessio Placitelli
fdceb69955 Bug 1395835 - Rename "group" to "category" in the scalar code and docs. r=chutten
MozReview-Commit-ID: HQ3I2cfEaa
2017-09-27 10:12:13 +02:00
Alessio Placitelli
e24412e896 Bug 1393801 - Enable dynamic scalar registration. f=gfritzsche,r=billm,chutten
MozReview-Commit-ID: JlRk7hLV5QD
2017-08-29 13:05:40 +02:00
Chris Peterson
0a61b3fb68 Bug 870698 - Part 10: Replace Append(NS_LITERAL_STRING("")) with AppendLiteral(u""). r=erahm
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.

MozReview-Commit-ID: H9I6vNDMdIr
2017-09-07 18:32:54 -07:00
Alessio Placitelli
324089ac37 Bug 1395838 - Rename nsITelemetry.SCALAR_* to nsITelemetry.SCALAR_TYPE_*. r=chutten
MozReview-Commit-ID: 6urKlSG0I6s
2017-09-06 12:35:44 +02:00
Vanessa Gutierrez
82386a51f7 Bug 1376942 - Corrected incorrect spelling in comment: servers changed to serves. r=gfritzsche 2017-07-12 09:01:00 +02:00
Krypto
c61bf6f9d8 Bug 1375043 - Rename m(Keyed)Accumulations to m(Keyed)HistogramAccumulations in DiscardedData. r=gfritzsche 2017-06-24 17:26:56 +05:30
Chris H-C
1ad2c3202b bug 1369041 - Allow child processes to discard data when overwhelmed r=bsmedberg,gfritzsche f?bsmedberg
It is possible in extreme cases that the Telemetry IPC Accumulator might be
starved long enough that it cannot drain its stored accumulations for a while.

Once we hit 5x the high water mark, start discarding data.

Count each piece and type of discarded data and report it via a custom IPC
message.

MozReview-Commit-ID: JayRpa5QPec
2017-06-09 09:53:42 -04:00
Georg Fritzsche
940a7067c5 Bug 1361661 - Part 3 - Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-23 13:48:13 +07:00
Sebastian Hengst
2d99162f7f Backed out changeset 42a4e28e6210 (bug 1361661) 2017-05-22 20:40:17 +02:00
Georg Fritzsche
ab50d638c5 Bug 1361661 - Part 3: Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-22 15:41:14 +07:00
Sebastian Hengst
de9a911353 Backed out changeset d1932fb366d4 (bug 1361661) 2017-05-22 16:19:21 +02:00
Georg Fritzsche
0f76edd4d9 Bug 1361661 - Part 3: Update the Telemetry core. r=dexter
Updates the core Telemetry code to use the new headers and support the extension process.
TelemetryHistogram is not cleanly refactored here; doing this uncovered a few time consuming issues with the various lookup code paths.
2017-05-22 15:41:14 +07:00
Georg Fritzsche
d8b6b7d1e8 Bug 1313326 - Part 2 - Restrict event recording to specified processes. r=dexter 2017-03-06 16:12:49 +01:00
Alessio Placitelli
39e707fc1f Bug 1340542 - Move the scalar ID checks to the public API. r=gfritzsche
MozReview-Commit-ID: 1tDkVKFdaeU
2017-02-22 11:57:04 +01:00
Georg Fritzsche
2011d0ae0c Bug 1339749 - Refactor Telemetry IPC code. r=chutten 2017-02-15 16:25:40 +01:00
Sylvestre Ledru
684bd41226 Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/components/telemetry/ r=Dexter
MozReview-Commit-ID: EjMufQ1PReI
2017-02-09 10:52:55 +01:00
Alessio Placitelli
e50dbc16d9 Bug 1334513 - Make sure Keyed Scalars APIs don't allow empty keys. r=gfritzsche 2017-01-31 05:46:00 -05:00
Alessio Placitelli
9b6924faf5 Bug 1333578 - Use mozilla::Variant instead of nsIVariant for child processes scalars. r=froydnj, f=gfritzsche
MozReview-Commit-ID: 1rB01Wi1Mkn
2017-01-30 12:04:00 +01:00
Alessio Placitelli
7f74c3f40c Bug 1333024 - Don't record scalars with the C++ API if not allowed in the current process. r=chutten 2017-01-23 07:40:00 +01:00