Sha256: 0cc589f9a514e302be024a2f081af8348b06b8e14ffc471ce72f15e333c4a28c

Contents?: true

Size: 1.43 KB

Versions: 23

Compression:

Stored size: 1.43 KB

Contents

Collecting Runtime Stats
===
RhoConnect provides a simple stats [rack middleware](http://railscasts.com/episodes/151-rack-middleware) for collecting runtime information on your application.  These stats are accessible from the [REST API](/rhoconnect/rest-api) and some default graphs are available from the [web console](/rhoconnect/web-console).

## Enabling Stats
To enable stats in your RhoConnect application, simply turn on the stats middleware by editing config.ru:

	:::ruby
	Rhoconnect::Server.enable  :stats

A complete config.ru might look like:

	:::ruby
	require 'rhoconnect/application/init'

	# secret is generated along with the app
	Rhoconnect::Server.set     :secret,      'my_secret'

	# !!! Add your custom initializers and overrides here !!!
	Rhoconnect::Server.enable  :stats

	# run RhoConnect Application
	run Rhoconnect.app
	

Now just restart your rhoconnect application:

	:::term
  	$ rhoconnect restart

And navigate to the 'Statistics' tab in your RhoConnect console:

	:::term
  	$ rhoconnect web

## Stats Console
You should see graphs, organized by categories:

<img src="http://rhodocs.s3.amazonaws.com/rhoconnect/stats-console.png"/>

RhoConnect statistics are organized into the following categories:

* User Count - # of users stored in redis

* Device Count - # of devices currently registered with RhoConnect

* HTTP Timing - # average HTTP request time by URL

* Source Timing - # average source adapter execution time by method

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 doc/stats-middleware.txt
rhoconnect-7.5.1 doc/stats-middleware.txt
rhoconnect-7.4.1 doc/stats-middleware.txt
rhoconnect-7.1.17 doc/stats-middleware.txt
rhoconnect-6.2.0 doc/stats-middleware.txt
rhoconnect-6.0.11 doc/stats-middleware.txt
rhoconnect-5.5.18 doc/stats-middleware.txt
rhoconnect-5.5.17 doc/stats-middleware.txt
rhoconnect-5.5.15 doc/stats-middleware.txt
rhoconnect-5.5.0.22 doc/stats-middleware.txt
rhoconnect-5.5.2 doc/stats-middleware.txt
rhoconnect-5.5.0.7 doc/stats-middleware.txt
rhoconnect-5.5.0.3 doc/stats-middleware.txt
rhoconnect-5.5.0 doc/stats-middleware.txt
rhoconnect-5.1.1 doc/stats-middleware.txt
rhoconnect-4.0.4 doc/stats-middleware.txt
rhoconnect-4.0.3 doc/stats-middleware.txt
rhoconnect-4.0.2 doc/stats-middleware.txt
rhoconnect-4.0.1 doc/stats-middleware.txt
rhoconnect-4.0.0 doc/stats-middleware.txt