Simple command line app for monitoring Status.im app peformance metrics running on mobile.
Go to file
Ivan Danyliuk 510b466601
Add netstats to csv output
2018-01-10 23:19:52 +01:00
demo Update demo picture 2018-01-10 23:15:14 +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 Update circular buffer 2017-12-16 12:54:13 +01:00
circbuffer_test.go Update circular buffer 2017-12-16 12:54:13 +01:00
csv.go Add netstats to csv output 2018-01-10 23:19:52 +01:00
data.go Add netstats to UI 2018-01-10 23:02:47 +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 netstats to csv output 2018-01-10 23:19:52 +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 netstats for ADB support 2018-01-10 22:27:57 +01:00
source_adb.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
source_local.go Add netstats for ADB support 2018-01-10 22:27:57 +01:00
top.go Add source interface 2017-12-19 15:37:58 +01:00
ui.go Tuned UI 2018-01-10 23:14:18 +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')