CouchRest Instrumentation

29 views
Skip to first unread message

Garren Smith

unread,
Jun 26, 2012, 12:48:48 PM6/26/12
to couc...@googlegroups.com
Hi All,

I'm using Couchrest Model in my current Rails 3.2 project. I added instrumentation so I could get a bit of information about what Couchrest was doing. It displays info on saves, views, gets and deletes. 
Sample output
  
  COUCHDB View (87.1ms) [ name: CourseProgress/by_user_id_and_course_id, params: {:key=>[2, 1], :limit=>1, :descending=>true, :include_docs=>true, :reduce=>false}, payload: {} ]
  COUCHDB View (8.2ms) [ name: LessonProgress/by_lesson_id_and_user_id, params: {:key=>[77, 2], :limit=>1, :descending=>true, :include_docs=>true, :reduce=>false}, payload: {} ]
  COUCHDB View (13.6ms) [ name: LessonProgress/by_course, params: {:key=>[1, 2], :include_docs=>true}, payload: {} ]

If anyone could recommend improvements etc or maybe if there isn't one already we can create a gem that people might find useful. 
Let me know if you find it useful.

Cheers
Garren
Reply all
Reply to author
Forward
0 new messages