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

Unified Diff: tools/telemetry/telemetry/core/browser.py

Issue 440783003: [Telemetry] Allow memory info to go missing on non-rooted devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/proc_supporting_platform_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/browser.py
diff --git a/tools/telemetry/telemetry/core/browser.py b/tools/telemetry/telemetry/core/browser.py
index c317e6a248068e21278e08fa0d926c4ae8925050..6a3c6ca0fa1f177e0ba5b8520523884139d89aa7 100644
--- a/tools/telemetry/telemetry/core/browser.py
+++ b/tools/telemetry/telemetry/core/browser.py
@@ -177,10 +177,12 @@ class Browser(object):
"""
self._platform_backend.PurgeUnpinnedMemory()
result = self._GetStatsCommon(self._platform_backend.GetMemoryStats)
- result['SystemCommitCharge'] = \
- self._platform_backend.GetSystemCommitCharge()
- result['SystemTotalPhysicalMemory'] = \
- self._platform_backend.GetSystemTotalPhysicalMemory()
+ commit_charge = self._platform_backend.GetSystemCommitCharge()
+ if commit_charge:
+ result['SystemCommitCharge'] = commit_charge
+ total = self._platform_backend.GetSystemTotalPhysicalMemory()
+ if total:
+ result['SystemTotalPhysicalMemory'] = total
return result
@property
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/platform/proc_supporting_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698