Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Producing statistics on Google App Engine

I want to show my users some statistics such as hits/second on Google App Engine. I started to roll my own:

  • On each page view, add 1 to a count in memcache.

Each minute:

  • Read and reset the count and also set a "since" variable to now.
  • Divide the number of hits by the amount of time since I last calculated.
  • Save the data to an entity in the datastore.
  • Throwing out data that's really old.

I then realised that this is non-trivial and there must be a library to do it, however I can't find one that works for me. I looked briefly at rrd4j and JRobin but I'm not sure they they're usable on Google App Engine without quite a lot of rewriting. Does anyone have any more ideas?

like image 866
mjaggard Avatar asked Aug 02 '12 12:08

mjaggard


1 Answers

Try new technique mentioned in this post http://googleappengine.blogspot.com/2012/07/analyzing-your-google-app-engine-logs.html.

It requires some additional work but it's worth trying. I'm using Mache (java framework) to ingest appengine logs into BigQuery and BigQuery API to query for results. Now pick a fancy javascript charts library and impress your users. Very powerful, flexible and scalable solution.

like image 95
Sasa Avatar answered Oct 23 '22 09:10

Sasa