Permalink
Browse files

Add ideas for new names

  • Loading branch information...
1 parent e350a07 commit 04ad1ba7017332ca211b5d5a9731fa5d8312304a @schmichael committed May 17, 2012
Showing with 11 additions and 0 deletions.
  1. +7 −0 TODO.rst
  2. +4 −0 mmstats/models.py
View
@@ -34,6 +34,8 @@ Layout and Conventions v2
This creates a single nested directory structure for each application where
each module, package, and library is free to define it's own mmstat class/file.
+Rename Fields to Metrics and rename classes in models.py
+
For example:
::
@@ -74,6 +76,11 @@ Psuedo-code for my_app/handlers.py:
function_stats.response_bad.inc()
return ret
+ def index(request):
+ my_stats = stats.get_group('index')
+ my_stats.reponse_ok.inc()
+ stats.index.response_ok.inc()
+
@stats_wrapper
def index(stats, request):
# implementation left up to the reader
View
@@ -14,6 +14,7 @@ def __init__(self, field):
self.field = field
+#TODO Rename to ???? ... MmStatsModel, MetricsModel ?
class FieldGroups(object):
def __init__(self, stats_class, groups, path=DEFAULT_PATH,
filename=DEFAULT_FILENAME):
@@ -83,6 +84,9 @@ def remove(self):
self._removed = True
+#TODO Rename to Template, MetricsTemplate, or Recipe
+#TODO Add build(groups=[...]) class method (maybe builder() to return a
+# decorator)
class BaseMmStats(object):
"""Stats models should inherit from this"""

0 comments on commit 04ad1ba

Please sign in to comment.