Permalink
Browse files

v 0.1

  • Loading branch information...
1 parent 74685aa commit 4a65772e7df4e0e59e5c9ff5c9ed764e19ac27e7 @weizhao11 committed Dec 10, 2011
Showing with 35 additions and 0 deletions.
  1. +35 −0 lib/restperf.rb
View
@@ -0,0 +1,35 @@
+
+module perf
+ module rest
+
+ ACTIONS = []
+
+ class Bag
+ @@bag = {}
+
+ def self.insert(id, action, result)
+ @@bag[id] ||= {}
+ @@bag[id][action] = result
+ puts "Actor #{id} finished #{action.to_s} at #{result} seconds"
+ end
+
+ def self.info
+ @@bag
+ end
+
+ def self.reset
+ @@bag = {}
+ end
+ end
+
+ class Actor
+ attr_reader :id
+
+ def initialize(id)
+ @id = id
+ @failed = false
+ end
+ end
+ end
+end
+

0 comments on commit 4a65772

Please sign in to comment.