Simple command line app for monitoring Status.im app peformance metrics running on mobile.
Go to file
Pedro Pombeiro 9f84e6a17a Add timestamps to debug output (#5) 2018-01-30 11:45:14 +01:00
demo Add memory usage metrics support (#4) 2018-01-18 11:37:18 +01:00
.gitignore Update misc 2017-12-16 14:41:24 +01:00
README.md Update README 2017-12-16 20:55:07 +01:00
circbuffer.go Move `HistoryLimit` to data structure consumer 2018-01-29 17:41:54 +01:00
circbuffer_test.go Update circular buffer 2017-12-16 12:54:13 +01:00
csv.go Add memory usage metrics support (#4) 2018-01-18 11:37:18 +01:00
data.go Move `HistoryLimit` to data structure consumer 2018-01-29 17:41:54 +01:00
dumpsys.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
dumpsys_test.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
main.go Add timestamps to debug output (#5) 2018-01-30 11:45:14 +01:00
meminfo.go Add memory usage metrics support (#4) 2018-01-18 11:37:18 +01:00
qtaguid.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
qtaguid_test.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
source.go Add memory usage metrics support (#4) 2018-01-18 11:37:18 +01:00
source_adb.go Fix wrong network stats bug (process uid was not being saved) 2018-01-29 16:43:45 +01:00
source_local.go Remove code repetition in `UI.UpdateNetstats` 2018-01-29 16:43:48 +01:00
top.go Add source interface 2017-12-19 15:37:58 +01:00
ui.go Make column header report time span of actual data that is reported for totals, max, etc 2018-01-29 18:36:31 +01:00

README.md

StatusMonitor

Simple command line app for monitoring CPU of the Status.im application running on the device (or simulator).


TODO:

  • iOS support
  • Add more metrics (memory, custom expvars, etc)
  • Optimize for higher frequencies (now 1s resolution)

Installation

Just:

go get github.com/status-im/statusmonitor

Usage

Just run statusmonitor binary. It will automatically connect to your device using adb, find the Status.im PID and start collecting data:

./statusmonitor

Press q to exit.

If you want to analyze data after, use -csv switch — all data will be written in the CSV file. Name of the file is autogenerated in form 20160102_150405.csv in the current folder.

Plot CSV with R

To analyze the data, you may use R lang. Here is a sample code that works well in R Studio:

Load data and convert UNIX timestamps into R's POSIXct object:

df = read.csv("~/Downloads/data.csv")
df$timestamp = as.POSIXct(df$timestamp, origin="1970-01-01")

Draw the plot:

plot(df, type="l", main="status CPU usage", col = 'green', lwd=2, cex.main=1.5, cex.axis=1, xlab="time", xaxt="n")
axis.POSIXct(1, df$timestamp, format="%H:%M:%S")

or interactive version with plotly:

library(plotly)
plot_ly(df, x = df$timestamp, y = df$cpu, type = 'scatter', mode = 'lines', fill = 'tozeroy')