-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memfault: add location session metrics #21
Conversation
5aaf033
to
86b4ae1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SWEET!
86b4ae1
to
9a5fa4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet, lgtm!
9a5fa4e
to
67c1fc9
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
67c1fc9
to
0bba332
Compare
f92a7ba
to
c00c61c
Compare
d5206cc
to
0e139a0
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Mainly small remarks.
applications/asset_tracker_v2/configuration/memfault/memfault_metrics_heartbeat_config.def
Show resolved
Hide resolved
modules/memfault-firmware-sdk/config/memfault_metrics_heartbeat_extra.def
Outdated
Show resolved
Hide resolved
9805381
to
b39bdc7
Compare
- Add location metrics - Remove asset tracker app location metrics Signed-off-by: Gillian Minnehan <[email protected]>
b39bdc7
to
4ddf060
Compare
Approved (I don't have rights to do it officially with github in this repository 😃) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged upstream in nrfconnect@2b9808a !
Summary
Metrics around a search session for a location fix give insights
into the performance of methods/devices being used to perform
the search, notably GNSS receivers but also cellular modems and
Wi-Fi chips. With this information, developers can adjust search
timeouts and enable/disable different methods that don't perform
as well giving the conditions their device is in.
Previously, GNSS metrics were being gathered in the asset tracker
app and reported in a heartbeat that was triggered whenever a
location session completed. This commit removes those heartbeat
metrics and adds metrics to observe a location search session, both
overall (how long it took, whether it was successful) and more
specifically the performance of each method.
New metrics
ncs_loc_search_time_ms
ncs_loc_search_success
(0/1)ncs_loc_accuracy_cm
ncs_loc_search_timeout_ms
- only recorded in a timeoutncs_loc_search_failure
(0/1)ncs_loc_gnss_time_to_fix_ms
ncs_loc_gnss_on_time_ms
ncs_loc_gnss_satellites_tracked_count
ncs_loc_gnss_satellites_used_count
ncs_loc_gnss_method_time_ms
ncs_loc_gnss_method_result
ncs_loc_lte_neighbor_cells_count
ncs_loc_lte_gci_cells_count
ncs_loc_lte_method_time_ms
ncs_loc_lte_method_result
ncs_loc_wifi_ap_count
ncs_loc_wifi_method_time_ms
ncs_loc_wifi_method_result
Notes:
*_method_result
metrics map to thelocation_event_id
enumeration in the
location
library.*_method_time_ms
metrics will be equal to the timeoutset for the method if the error is a timeout
ncs_loc_search_success
andncs_loc_search_failure
could be used in the future to create a high level "location
session success rate" insight (
ncs_loc_search_success
/(
ncs_loc_search_success
+ncs_loc_search_failure
)Since location metrics are now built-in, this commit also removes the
location metrics in the asset tracker app, and enables the location
metrics in
overlay-memfault.conf
.Test Plan
Results
Note:
ncs_loc_gnss_exec_time_ms
was added during review -- fullresults were not re-gathered but a simple test captured an expected
value in relation to the on time:
Results from successful session
GNSS succeeds
LTE succeeds
Required config adjustments:
Results from failed session
GNSS alone fails
Debug prints:
Required config adjustments:
GNSS fails, cellular fails
Debug prints:
Wifi alone fails
Debug logs:
Required config adjustments:
Used the nRF7002-EK on top of the nRF9160dk. My build command was:
I also needed to flip a handful of Kconfig flags so I could fit the image in the flash partition.
Using the EK bumped the image size considerably.
Checked correct value of
ncs_loc_search_request_count
heartbeatmetric by checking number of sessions reported in heartbeat window
Confirmed asset tracker app builds with in-tree app changes
Notable results not gathered
Wifi scan succeeds alone. Currently do not have a good approach for getting
a scan to successfully determine location. But I confirmed the scan itself
was successful (the number of APs printed matched what was captured in
the metric and my wifi network was on the list)
GNSS fails, cellular or wifi succeeds. Currently do not have a good approach
for forcing this test result, but we are seeing some cellular and wifi data so data
collection is working properly. We can test on our fleet for some time to see if
various conditions result in this case
Resolves: MCU-191