traced 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +108 -0
- data/Rakefile +1 -0
- data/lib/traced.rb +50 -0
- data/lib/traced/client.rb +19 -0
- data/lib/traced/version.rb +3 -0
- data/spec/lib/traced_spec.rb +221 -0
- data/spec/spec_helper.rb +19 -0
- data/spec/support/fake_statsd_client.rb +9 -0
- data/tags +30 -0
- data/traced.gemspec +24 -0
- metadata +105 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OGIwMWU3MmI3OGY5MGZhOGJiZDVhNDY0ODU2ZjdkYTU5YjgwZmIyNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MWNhZGIwYmJhNDM2NmI2MzRmNWFlNDdmYzBiMGJhMjhlZWQwOWFmMw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjQ2MmUzYTNkN2JlYjI5NzVhMzUzMmNiY2FjMDAzZDY4NjFjMDU3ZGRiY2Q2
|
10
|
+
OGJiMWUxZDEyNTc2OTZhOGQ4YjUyYzhhZGY1ODUzYjQ4MTU2NDIzZjVhYWM0
|
11
|
+
YmJiYjE5NzdhMTUxZjFiMjQxYTlmMzlkY2Y2ODJiZDM2YmY5OGI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
N2ZlN2Q3OTUzMWU4ZmQzZGViYzNjMDI4MmVkYjRkZTZkZDNmNzY3YmJlOTg1
|
14
|
+
YjQ4MmM5MjVhMDdkODY5Y2FmNDRlMmY5ZDhmYmZlOGNhYzllMDIxOTJmZjYw
|
15
|
+
MjhmZDczMGNiNTBiN2M5MzU3ZjhiMDFhZTRiYjc4NGEzN2Y1YTk=
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Erez Rabih
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
# Traced
|
2
|
+
|
3
|
+
TraceD is a ruby library which enables you to easily trace your methods via [StatsD](https://github.com/etsy/statsd/)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'traced'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install traced
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
### Configuration
|
22
|
+
|
23
|
+
Before using TraceD in your code you will have to provide it with a StatsD
|
24
|
+
Client. You can use many existing clients like [statsd-ruby](https://github.com/reinh/statsd).
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
TraceD::Client.set(Statsd.new 'localhost', 9125)
|
28
|
+
```
|
29
|
+
I'll be using statsd-ruby as my client example in the usage scenarios.
|
30
|
+
|
31
|
+
### Usage Scenraios
|
32
|
+
|
33
|
+
Let's assume we have a Dummy class and we want to trace some_method:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'traced'
|
37
|
+
require 'statsd'
|
38
|
+
TraceD::Client.set(Statsd.new 'localhost', 9125)
|
39
|
+
|
40
|
+
class Dummy
|
41
|
+
|
42
|
+
include TraceD
|
43
|
+
|
44
|
+
def some_method(arg)
|
45
|
+
end
|
46
|
+
|
47
|
+
statsd_trace :some_method
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
Simliarly, if we want to trace a class method, this is how things would look
|
52
|
+
like:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
require 'traced'
|
56
|
+
require 'statsd'
|
57
|
+
TraceD::Client.set(Statsd.new 'localhost', 9125)
|
58
|
+
|
59
|
+
class Dummy
|
60
|
+
class << self
|
61
|
+
include TraceD
|
62
|
+
|
63
|
+
def some_method(arg)
|
64
|
+
end
|
65
|
+
|
66
|
+
statsd_trace :some_method
|
67
|
+
end
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
## Tracing Options
|
72
|
+
|
73
|
+
### Stat Name
|
74
|
+
|
75
|
+
By default, TraceD assigns the following stat name:
|
76
|
+
|
77
|
+
```
|
78
|
+
method_tracer.<Class Name>.<Method Name>
|
79
|
+
```
|
80
|
+
For example, in the first usage scenraio, the reported stat would be
|
81
|
+
```
|
82
|
+
method_tracer.Dummy.some_method
|
83
|
+
```
|
84
|
+
|
85
|
+
You can pass your own custom stat name in the following way:
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
statsd_trace :some_method, stat_name: "custom.stat.name"
|
89
|
+
```
|
90
|
+
|
91
|
+
### Execution Count
|
92
|
+
|
93
|
+
By default, TraceD will only report the execution time of the method.
|
94
|
+
You can ask it to report the number of times a method has been called in the
|
95
|
+
following way:
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
statsd_trace :some_method, count: true
|
99
|
+
```
|
100
|
+
This way, both execution time and count will be reported
|
101
|
+
|
102
|
+
## Contributing
|
103
|
+
|
104
|
+
1. Fork it
|
105
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
106
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
107
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
108
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/traced.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require "traced/version"
|
2
|
+
require 'traced/client'
|
3
|
+
|
4
|
+
module TraceD
|
5
|
+
|
6
|
+
def self.included clazz
|
7
|
+
clazz.extend ClassMethods
|
8
|
+
end
|
9
|
+
|
10
|
+
module InstanceMethods
|
11
|
+
|
12
|
+
def traced_method_name(method)
|
13
|
+
"_statsd_traced_#{method}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def default_time_stat_name(method)
|
17
|
+
my_name = self.class.name == "Class" ? self.name : self.class.name
|
18
|
+
"method_tracer.#{my_name}.#{method}"
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_count_stat_name(stat_name)
|
22
|
+
"#{stat_name}.count"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module ClassMethods
|
27
|
+
def statsd_trace(method, opts = {})
|
28
|
+
|
29
|
+
old_method_name = traced_method_name(method)
|
30
|
+
alias_method old_method_name, method
|
31
|
+
|
32
|
+
define_method method do |*args|
|
33
|
+
|
34
|
+
opts[:stat_name] ||= default_time_stat_name(method)
|
35
|
+
opts[:count_stat_name] = default_count_stat_name(opts[:stat_name])
|
36
|
+
|
37
|
+
::TraceD::Client.increment(opts[:count_stat_name]) if opts[:count]
|
38
|
+
::TraceD::Client.time(opts[:stat_name]) do
|
39
|
+
self.send(old_method_name, *args)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
include ::TraceD::InstanceMethods
|
46
|
+
end
|
47
|
+
|
48
|
+
include InstanceMethods
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'traced'
|
3
|
+
|
4
|
+
describe TraceD do
|
5
|
+
|
6
|
+
before :all do
|
7
|
+
TraceD::Client.set(FakeStatsdClient.new)
|
8
|
+
end
|
9
|
+
|
10
|
+
module DummyMethods
|
11
|
+
def zero
|
12
|
+
return 0
|
13
|
+
end
|
14
|
+
|
15
|
+
def sum(arg1, arg2, arg3)
|
16
|
+
return arg1 + arg2 + arg3
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class Dummy1
|
21
|
+
include TraceD
|
22
|
+
include DummyMethods
|
23
|
+
end
|
24
|
+
|
25
|
+
class Dummy2
|
26
|
+
include TraceD
|
27
|
+
include DummyMethods
|
28
|
+
end
|
29
|
+
|
30
|
+
class Dummy3
|
31
|
+
include TraceD
|
32
|
+
include DummyMethods
|
33
|
+
end
|
34
|
+
|
35
|
+
class Dummy4
|
36
|
+
class << self
|
37
|
+
include TraceD
|
38
|
+
def zero
|
39
|
+
return 0
|
40
|
+
end
|
41
|
+
|
42
|
+
def sum(arg1, arg2, arg3)
|
43
|
+
return arg1 + arg2 + arg3
|
44
|
+
end
|
45
|
+
statsd_trace :zero, count: true
|
46
|
+
statsd_trace :sum, stat_name: "class_sum"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe "before tracing" do
|
51
|
+
|
52
|
+
describe :zero do
|
53
|
+
it "should return zero" do
|
54
|
+
Dummy1.new.zero.should eq 0
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe :sum do
|
59
|
+
it "should return the sum" do
|
60
|
+
Dummy1.new.sum(1,2,3).should eq 6
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "traced" do
|
67
|
+
|
68
|
+
before :all do
|
69
|
+
Dummy1.class_eval do
|
70
|
+
statsd_trace :zero
|
71
|
+
statsd_trace :sum
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
describe :zero do
|
76
|
+
it "should return zero" do
|
77
|
+
Dummy1.new.zero.should eq 0
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
describe :sum do
|
82
|
+
it "should return the sum 1" do
|
83
|
+
Dummy1.new.sum(1,2,3).should eq 6
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
describe "statsd reporting" do
|
88
|
+
context "default stats name" do
|
89
|
+
it "should generate default name for stats" do
|
90
|
+
TraceD::Client.should_receive(:time).with("method_tracer.Dummy1.zero").once
|
91
|
+
TraceD::Client.should_receive(:time).with("method_tracer.Dummy1.sum").once
|
92
|
+
Dummy1.new.zero
|
93
|
+
Dummy1.new.sum(1,2,3)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "trace with stat name" do
|
100
|
+
|
101
|
+
before :all do
|
102
|
+
Dummy2.class_eval do
|
103
|
+
statsd_trace :zero, stat_name: :zero_stat
|
104
|
+
statsd_trace :sum, stat_name: :sum_stat
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
describe :zero do
|
109
|
+
it "should return zero" do
|
110
|
+
Dummy2.new.zero.should eq 0
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe :sum do
|
115
|
+
it "should return the sum 1" do
|
116
|
+
Dummy2.new.sum(1,2,3).should eq 6
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
describe "statsd reporting" do
|
121
|
+
context "stats name" do
|
122
|
+
it "should report with given stat name" do
|
123
|
+
TraceD::Client.should_receive(:time).with(:zero_stat).once
|
124
|
+
TraceD::Client.should_receive(:time).with(:sum_stat).once
|
125
|
+
Dummy2.new.zero
|
126
|
+
Dummy2.new.sum(1,2,3)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "trace with count" do
|
133
|
+
|
134
|
+
before :all do
|
135
|
+
Dummy3.class_eval do
|
136
|
+
statsd_trace :zero, count: true
|
137
|
+
statsd_trace :sum
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe :zero do
|
142
|
+
it "should return zero" do
|
143
|
+
Dummy3.new.zero.should eq 0
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
describe :sum do
|
148
|
+
it "should return the sum 1" do
|
149
|
+
Dummy3.new.sum(1,2,3).should eq 6
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
describe "statsd reporting" do
|
154
|
+
context "stats name" do
|
155
|
+
it "should report with given stat name" do
|
156
|
+
TraceD::Client.should_receive(:time).with("method_tracer.Dummy3.zero").once
|
157
|
+
TraceD::Client.should_receive(:time).with("method_tracer.Dummy3.sum").once
|
158
|
+
Dummy3.new.zero
|
159
|
+
Dummy3.new.sum(1,2,3)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
context "count" do
|
164
|
+
it "should count traced method with count" do
|
165
|
+
TraceD::Client.should_receive(:increment).with("method_tracer.Dummy3.zero.count").once
|
166
|
+
Dummy3.new.zero
|
167
|
+
end
|
168
|
+
|
169
|
+
it "should not count traced method without count" do
|
170
|
+
TraceD::Client.should_not_receive(:increment)
|
171
|
+
Dummy3.new.sum(1,2,3)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
describe "tracing class methods" do
|
178
|
+
|
179
|
+
describe :zero do
|
180
|
+
it "should return zero" do
|
181
|
+
Dummy4.zero.should eq 0
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
describe :sum do
|
186
|
+
it "should return the sum 1" do
|
187
|
+
Dummy4.sum(1,2,3).should eq 6
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
describe "statsd reporting" do
|
192
|
+
context "default stats name" do
|
193
|
+
|
194
|
+
context "zero" do
|
195
|
+
it "should report time" do
|
196
|
+
TraceD::Client.should_receive(:time).with("method_tracer.Dummy4.zero").once
|
197
|
+
Dummy4.zero
|
198
|
+
end
|
199
|
+
|
200
|
+
it "should report count" do
|
201
|
+
TraceD::Client.should_receive(:increment).with("method_tracer.Dummy4.zero.count").once
|
202
|
+
Dummy4.zero
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
context "sum" do
|
207
|
+
it "should report time" do
|
208
|
+
TraceD::Client.should_receive(:time).with("class_sum").once
|
209
|
+
Dummy4.sum(1,2,3)
|
210
|
+
end
|
211
|
+
|
212
|
+
it "should not report count" do
|
213
|
+
TraceD::Client.should_not_receive(:increment)
|
214
|
+
Dummy4.sum(1,2,3)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
Dir["./spec/support/**/*.rb"].sort.each {|f| require f}
|
8
|
+
#
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
11
|
+
config.run_all_when_everything_filtered = true
|
12
|
+
config.filter_run :focus
|
13
|
+
|
14
|
+
# Run specs in random order to surface order dependencies. If you find an
|
15
|
+
# order dependency and want to debug it, you can fix the order by providing
|
16
|
+
# the seed, which is printed after each run.
|
17
|
+
# --seed 1234
|
18
|
+
config.order = 'random'
|
19
|
+
end
|
data/tags
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.8 //
|
7
|
+
ClassMethods /Users/erez/workspace/traced/lib/traced.rb /^ module ClassMethods$/;" m class:TraceD
|
8
|
+
Client /Users/erez/workspace/traced/lib/traced/client.rb /^ class Client$/;" c class:TraceD
|
9
|
+
Dummy1 /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ class Dummy1$/;" c
|
10
|
+
Dummy2 /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ class Dummy2$/;" c
|
11
|
+
Dummy3 /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ class Dummy3$/;" c
|
12
|
+
Dummy4 /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ class Dummy4$/;" c
|
13
|
+
DummyMethods /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ module DummyMethods$/;" m
|
14
|
+
InstanceMethods /Users/erez/workspace/traced/lib/traced.rb /^ module InstanceMethods$/;" m class:TraceD
|
15
|
+
TraceD /Users/erez/workspace/traced/lib/traced.rb /^module TraceD$/;" m
|
16
|
+
TraceD /Users/erez/workspace/traced/lib/traced/client.rb /^module TraceD$/;" m
|
17
|
+
Traced /Users/erez/workspace/traced/lib/traced/version.rb /^module Traced$/;" m
|
18
|
+
client /Users/erez/workspace/traced/lib/traced/client.rb /^ def client$/;" f class:TraceD.Client
|
19
|
+
config /Users/erez/workspace/traced/lib/traced/client.rb /^ def config$/;" f class:TraceD.Client
|
20
|
+
default_count_stat_name /Users/erez/workspace/traced/lib/traced.rb /^ def default_count_stat_name(stat_name)$/;" f class:TraceD.InstanceMethods
|
21
|
+
default_time_stat_name /Users/erez/workspace/traced/lib/traced.rb /^ def default_time_stat_name(method)$/;" f class:TraceD.InstanceMethods
|
22
|
+
included /Users/erez/workspace/traced/lib/traced.rb /^ def self.included clazz$/;" F class:TraceD
|
23
|
+
method_missing /Users/erez/workspace/traced/lib/traced/client.rb /^ def method_missing(sym, *args, &block)$/;" f class:TraceD.Client
|
24
|
+
statsd_enabled? /Users/erez/workspace/traced/lib/traced/client.rb /^ def statsd_enabled?$/;" f class:TraceD.Client
|
25
|
+
statsd_trace /Users/erez/workspace/traced/lib/traced.rb /^ def statsd_trace(method, opts = {})$/;" f class:TraceD.ClassMethods
|
26
|
+
sum /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ def sum(arg1, arg2, arg3)$/;" f class:Dummy4
|
27
|
+
sum /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ def sum(arg1, arg2, arg3)$/;" f class:DummyMethods
|
28
|
+
traced_method_name /Users/erez/workspace/traced/lib/traced.rb /^ def traced_method_name(method)$/;" f class:TraceD.InstanceMethods
|
29
|
+
zero /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ def zero$/;" f class:Dummy4
|
30
|
+
zero /Users/erez/workspace/traced/spec/lib/traced_spec.rb /^ def zero$/;" f class:DummyMethods
|
data/traced.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'traced/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "traced"
|
8
|
+
spec.version = Traced::VERSION
|
9
|
+
spec.authors = ["Erez Rabih"]
|
10
|
+
spec.email = ["erez.rabih@gmail.com"]
|
11
|
+
spec.description = %q{Method tracer for Statsd written in Ruby}
|
12
|
+
spec.summary = %q{TraceD is a small module which enables seamless method tracing for both execution time and execution count}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: traced
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Erez Rabih
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Method tracer for Statsd written in Ruby
|
56
|
+
email:
|
57
|
+
- erez.rabih@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- .rspec
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- lib/traced.rb
|
69
|
+
- lib/traced/client.rb
|
70
|
+
- lib/traced/version.rb
|
71
|
+
- spec/lib/traced_spec.rb
|
72
|
+
- spec/spec_helper.rb
|
73
|
+
- spec/support/fake_statsd_client.rb
|
74
|
+
- tags
|
75
|
+
- traced.gemspec
|
76
|
+
homepage: ''
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.0.5
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: TraceD is a small module which enables seamless method tracing for both execution
|
100
|
+
time and execution count
|
101
|
+
test_files:
|
102
|
+
- spec/lib/traced_spec.rb
|
103
|
+
- spec/spec_helper.rb
|
104
|
+
- spec/support/fake_statsd_client.rb
|
105
|
+
has_rdoc:
|