Permalink
Browse files

Readme updates

  • Loading branch information...
1 parent 32a5066 commit dde3196a74a7134e2e5d25c850679f1bca9e45f0 @zorab47 committed Nov 17, 2011
Showing with 14 additions and 6 deletions.
  1. +14 −6 README.md
View
@@ -1,13 +1,13 @@
# Metrics Collector
Metrics Collector is a lightweight method of defining application metrics
-to aid in product decisions. And those metrics are integrated directly
-into your application. It allows you to answer questions like:
+to aid in product decisions. Plus those metrics are integrated directly
+into your application which allows you to answer questions like:
-* How fast is my application growing (number of user sign-ups)?
-* Is this feature actually being used?
+* How fast is my app growing (number of user sign-ups)?
+* Is this feature being used?
-Defining those custom metrics is done by adding metric blocks to your
+Defining those custom metrics is done by adding metric blocks to your
application classes.
metric :users do
@@ -17,7 +17,7 @@ application classes.
Your custom metrics are stored in a backend you define, such as an ActiveRecord
model or another cool method of persisting data. Making snapshots of your
metrics help you keep an accurate measure. For example, if a users deletes
-his account within your application and along with it all his dependent
+his account within your application and along with it all his dependent
records, any calculated metrics will be incorrect.
Currently, the metrics are assumed to be collected daily other time periods
@@ -29,6 +29,8 @@ those metrics using the [Google Charts API][GoogleCharts].
## Defining Metrics
class Image
+ extend MetricCollector::ModelAdditions::ClassMethods
+
metric :disk_usage do
%x[du -s "#{Rails.root}/assets/images" | cut -f 1].chomp
end
@@ -38,6 +40,12 @@ those metrics using the [Google Charts API][GoogleCharts].
end
end
+## Collecting Metrics
+
+MetricCollector comes with a predefined rake task:
+`rake metrics_collector:collect`.That task outputs a text reading of all
+metrics defined in your application.
+
## Backends
The initial storage backend will be ActiveRecord with more to come.

0 comments on commit dde3196

Please sign in to comment.