Alessio Placitelli
3b4ea95f6f
Merge pull request #79 from Dexterp37/logcat
...
Redirect logging to stdout in tests
2019-05-20 16:08:58 +02:00
Alessio Placitelli
666bfb01dd
Document why it's ok to log when the logger fails to init
2019-05-20 15:56:07 +02:00
Jan-Erik Rediger
a84711698c
Bug 1552820 - Expose boolean test API and re-enable metric tests ( #78 )
...
Bug 1552820 - Expose boolean test API and re-enable metric tests
2019-05-20 15:48:24 +02:00
Jan-Erik Rediger
bb9ead2256
Bug 1552511 - Use finalizers to destruct metrics ( #77 )
...
Bug 1552511 - Use finalizers to destruct metrics
2019-05-20 15:47:16 +02:00
Jan-Erik Rediger
4403aa97f4
Document how to add a new metric type in the code ( #74 )
...
Document how to add a new metric type in the code
2019-05-20 15:28:56 +02:00
Alessio Placitelli
506a2f9c94
Remove stray println from the Kotlin code
2019-05-20 15:22:43 +02:00
Alessio Placitelli
938ce65c60
Enable logging in unit tests
...
This makes sure that a proper log implementation
is available in the Rust core on non-Android
platforms. Additionally, this ensures that Kotlin
code redirects log calls to stdout.
2019-05-20 15:17:04 +02:00
Jan-Erik Rediger
00033c3a95
Merge pull request #76 from mozilla/infallible-lifetime-conversion
...
Default to a ping lifetime during conversion
2019-05-20 15:13:16 +02:00
Michael Droettboom
dd5439695d
1552122: Initial port (with some stubbing) of Glean core API ( #72 )
...
* Copy files over from glean-ac
* 1552122: Initial port (with some stubbing) of Glean core API
* Address comments in the PR
* Change where JSON is serialized
* Restore collect_string
* Remove unnecessary import
* More uses of toBoolean
2019-05-20 09:12:15 -04:00
Jan-Erik Rediger
00a9020f4e
Bug 1552820 - Expose boolean test API and re-enable metric tests
2019-05-20 15:06:22 +02:00
Jan-Erik Rediger
2d936138b0
Log and bail out on failing to convert lifetime
2019-05-20 11:43:03 +02:00
Jan-Erik Rediger
d2aef29503
Make it clear that the struct should not hold the data directly
2019-05-20 11:42:11 +02:00
Jan-Erik Rediger
2d67de7b1a
Simplify lifetime conversion
2019-05-20 11:42:08 +02:00
Jan-Erik Rediger
12ae60784c
Finalize and delete a boolean metric
2019-05-20 10:34:44 +02:00
Jan-Erik Rediger
952303099d
Finalize and delete a string metric
2019-05-20 10:34:04 +02:00
Jan-Erik Rediger
6faf7afd51
Finalize and delete a counter metric
2019-05-20 10:33:59 +02:00
Jan-Erik Rediger
1f23ebc05b
Apply suggestions from code review
...
Co-Authored-By: Michael Droettboom <mdboom@gmail.com>
2019-05-20 10:13:17 +02:00
Jan-Erik Rediger
458a775acc
Document how to add a new metric type in the code
2019-05-17 15:13:12 +02:00
Michael Droettboom
b8dc19d966
1552474: Add a Byte.toBoolean convenience function ( #73 )
2019-05-17 08:47:36 -04:00
Michael Droettboom
110e44584d
1551692: Don't schedule the uploading worker if no ping queued ( #67 )
...
* 1551692: Don't schedule the uploading worker if no ping queued
* Address feedback in the PR
* Use toByte
2019-05-16 18:07:21 -04:00
Jan-Erik Rediger
ccef0fd863
Update pull_request_template.md ( #66 )
...
Update pull_request_template.md
2019-05-16 17:37:32 +02:00
Alessio Placitelli
1fbc891c55
Merge pull request #69 from Dexterp37/dispatchers_assert_tests
...
Enable checking for Dispatcher's test mode in the test API
2019-05-16 17:04:44 +02:00
Jan-Erik Rediger
96d5fea88d
Merge branch 'master' into dispatchers_assert_tests
2019-05-16 16:12:22 +02:00
Jan-Erik Rediger
435dbde024
Merge pull request #71 from mozilla/makemakemake
...
Small edits on makefile
2019-05-16 16:11:30 +02:00
Jan-Erik Rediger
634f447dfb
Multi-threaded tests locally
2019-05-16 15:06:34 +02:00
Jan-Erik Rediger
7681ddd65a
Merge pull request #70 from mozilla/counter-metric-i32
...
Use i32 everywhere for counters
2019-05-16 14:48:55 +02:00
Jan-Erik Rediger
dd5e947c4a
Make lint depend on properly formatted Rust code
2019-05-16 14:05:33 +02:00
Jan-Erik Rediger
f65a1b796d
Don't try to guess ANDROID_HOME
...
It was only ever correct for default installs on macOS anyway.
2019-05-16 14:05:10 +02:00
Jan-Erik Rediger
d3e4f01df7
Use i32 everywhere for counters
...
We actually should use u32 internally, but:
because Kotlin doesn't (yet) have unsigned integers, it's always going to pass us signed values.
We also do all the error checking on the Rust side, so we need to receive the signed value to check for negativity and bail out.
We still don't do overflow checks though.
2019-05-16 14:01:39 +02:00
Alessio Placitelli
9aa6e56aac
Bonus: add the application channel metric back
2019-05-16 12:47:15 +02:00
Alessio Placitelli
6a3034e79c
Enable checking for Dispatcher's test mode in the test API
2019-05-16 12:45:09 +02:00
Alessio Placitelli
033f0550ea
Merge pull request #68 from Dexterp37/add_contacts_to_readme
...
Add a Contact section to the readme file
2019-05-16 12:38:51 +02:00
Alessio Placitelli
3ea5246587
Add a Contact section to the readme file
...
This also updates the bugzilla new bug template
to add the expected priority and whiteboard tag
so that bugs show up on bugzhub.
2019-05-16 12:29:17 +02:00
Jan-Erik Rediger
dbdeff47fd
Merge pull request #65 from mozilla/1551892-string-metric-test-api
...
Bug 1551892: Implement the testing API for the StringMetricType and enable the related tests
2019-05-16 09:25:34 +02:00
Michael Droettboom
d897aa400a
Update pull_request_template.md
2019-05-15 13:52:33 -04:00
Jan-Erik Rediger
a7a2a9c50a
Remove impossible test.
...
Our metrics cannot _not_ have a lifetime.
The next test is exactly equivalent, but better named (testing that disabled metrics don't get recorded).
2019-05-15 17:46:44 +02:00
Jan-Erik Rediger
5521c2e9d8
Re-enable string metric tests
2019-05-15 17:46:44 +02:00
Jan-Erik Rediger
15913f906b
Copy out returned string (and free it Rust-internal)
2019-05-15 17:46:44 +02:00
Jan-Erik Rediger
88001cc3fc
Expose test API for string metric over Ffi
...
I had to rewrite the nested call_infallible to avoid double-calling of IntoFfi.
2019-05-15 17:04:58 +02:00
Michael Droettboom
2d6995a03d
1551153: Enable the ping uploader in glean-core ( #60 )
...
* Bring in uploading-related files from glean-ac
* 1551153: Enable the ping uploader in glean-core
* Address feedback in the PR
2019-05-15 10:39:41 -04:00
Jan-Erik Rediger
3c663feb46
Bug 1551863 - Pass missing disabled flag to Rust side ( #64 )
...
Bug 1551863 - Pass missing disabled flag to Rust side
2019-05-15 16:35:05 +02:00
Jan-Erik Rediger
fe47fdaabf
Re-enable counter tests for disabled flag
2019-05-15 16:26:28 +02:00
Jan-Erik Rediger
6ea391974d
Use an extension method for bool to byte conversion
2019-05-15 16:17:01 +02:00
Jan-Erik Rediger
37d989efbe
Bug 1551863 - Pass missing disabled flag to Rust side
2019-05-15 15:43:23 +02:00
Jan-Erik Rediger
cc60dc80de
Dont send pings if empty ( #58 )
...
Dont send pings if empty
2019-05-15 15:19:51 +02:00
Alessio Placitelli
24760b4bbb
Merge pull request #63 from Dexterp37/asyncAPI
...
Expose an internal sync API and make the public API async
2019-05-15 14:48:16 +02:00
Jan-Erik Rediger
bd2abd819f
Update links and naming across the repository ( #62 )
...
Update links and naming across the repository
2019-05-15 14:12:27 +02:00
Alessio Placitelli
9c806ee175
Make the publicly exposed API async for the CounterMetricType
2019-05-15 12:54:52 +02:00
Alessio Placitelli
71fc1ad74e
Backport the `Glean.enableTestMode` function
2019-05-15 12:53:22 +02:00
Alessio Placitelli
8580c0a4c2
Use the metric synchronous API to init core metrics
2019-05-15 12:46:31 +02:00