Simple command line app for monitoring Status.im app peformance metrics running on mobile.
Go to file
Ivan Danyliuk 6ad8d7dc68
Update README
2017-12-16 20:55:07 +01:00
demo Update README and some fixes 2017-12-16 15:20:26 +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
adb_pid.go Initial commit 2017-12-16 12:24:37 +01:00
adb_shell.go Update top output parse 2017-12-16 19:19:27 +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 Improved CSV dump 2017-12-16 14:27:42 +01:00
data.go Connect data to UI 2017-12-16 13:00:33 +01:00
main.go Improve messages on exit 2017-12-16 20:51:45 +01:00
top.go Improve messages on exit 2017-12-16 20:51:45 +01:00
ui.go Add time to header 2017-12-16 14:46:35 +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')