newrelic-thinking-sphinx 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +34 -0
- data/lib/newrelic-thinking-sphinx.rb +1 -0
- data/lib/newrelic_thinking_sphinx/instrumentation.rb +27 -0
- data/newrelic-thinking-sphinx.gemspec +18 -0
- metadata +81 -0
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# newrelic-thinking-sphinx
|
2
|
+
|
3
|
+
Thinking-Sphinx instrumentation for NewRelic.
|
4
|
+
|
5
|
+
## REQUIREMENTS
|
6
|
+
|
7
|
+
Version >= 3.0.0 of the Thinking-Sphinx gem.
|
8
|
+
|
9
|
+
## INSTALL
|
10
|
+
|
11
|
+
`gem install newrelic-thinking-sphinx`
|
12
|
+
|
13
|
+
## License
|
14
|
+
(The MIT License)
|
15
|
+
Copyright (c) 2013 Tom Harris.
|
16
|
+
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
18
|
+
a copy of this software and associated documentation files (the
|
19
|
+
'Software'), to deal in the Software without restriction, including
|
20
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
21
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
22
|
+
permit persons to whom the Software is furnished to do so, subject to
|
23
|
+
the following conditions:
|
24
|
+
|
25
|
+
The above copyright notice and this permission notice shall be
|
26
|
+
included in all copies or substantial portions of the Software.
|
27
|
+
|
28
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
29
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
30
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
31
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
32
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
33
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
34
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'newrelic_thinking_sphinx/instrumentation'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
DependencyDetection.defer do
|
2
|
+
@name = :thinking_sphinx
|
3
|
+
|
4
|
+
depends_on do
|
5
|
+
defined?(::ThinkingSphinx) and !NewRelic::Control.instance['disable_thinking_sphinx']
|
6
|
+
end
|
7
|
+
|
8
|
+
executes do
|
9
|
+
NewRelic::Agent.logger.debug 'Installing Thinking Sphinx instrumentation'
|
10
|
+
end
|
11
|
+
|
12
|
+
executes do
|
13
|
+
class ::ThinkingSphinx::Search
|
14
|
+
include NewRelic::Agent::MethodTracer
|
15
|
+
|
16
|
+
add_method_tracer :populate
|
17
|
+
add_method_tracer :results
|
18
|
+
end
|
19
|
+
|
20
|
+
# #query will show us actual sphinx time vs #populate which includes db fetching
|
21
|
+
class ::Riddle::Client
|
22
|
+
include NewRelic::Agent::MethodTracer
|
23
|
+
|
24
|
+
add_method_tracer :query
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'newrelic-thinking-sphinx'
|
3
|
+
spec.version = '0.1.1'
|
4
|
+
|
5
|
+
spec.author = 'Tom Harris'
|
6
|
+
spec.email = 'thomaspec.e.harris@gmail.com'
|
7
|
+
spec.description = 'Thinking-Sphinx instrumentation for New Relic. Get performance metrics for Thinking-Sphinx in New Relic'
|
8
|
+
spec.summary = 'Thinking-Sphinx instrumentation for New Relic.'
|
9
|
+
|
10
|
+
spec.files = %w(README.md newrelic-thinking-sphinx.gemspec)
|
11
|
+
spec.files += Dir.glob("lib/**/*.rb")
|
12
|
+
spec.homepage = 'https://github.com/tomharris/newrelic-thinking-sphinx'
|
13
|
+
spec.require_paths = ['lib']
|
14
|
+
spec.required_rubygems_version = '>= 1.3.6'
|
15
|
+
|
16
|
+
spec.add_dependency 'newrelic_rpm', '~> 3.6.0'
|
17
|
+
spec.add_dependency 'thinking-sphinx', '~> 3.0.0'
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: newrelic-thinking-sphinx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Tom Harris
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: newrelic_rpm
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.6.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.6.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: thinking-sphinx
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 3.0.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 3.0.0
|
46
|
+
description: Thinking-Sphinx instrumentation for New Relic. Get performance metrics
|
47
|
+
for Thinking-Sphinx in New Relic
|
48
|
+
email: thomaspec.e.harris@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- README.md
|
54
|
+
- newrelic-thinking-sphinx.gemspec
|
55
|
+
- lib/newrelic-thinking-sphinx.rb
|
56
|
+
- lib/newrelic_thinking_sphinx/instrumentation.rb
|
57
|
+
homepage: https://github.com/tomharris/newrelic-thinking-sphinx
|
58
|
+
licenses: []
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
require_paths:
|
62
|
+
- lib
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ! '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.3.6
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.8.25
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Thinking-Sphinx instrumentation for New Relic.
|
81
|
+
test_files: []
|