skylight 1.7.2 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -33
- data/ext/extconf.rb +32 -6
- data/ext/libskylight.yml +6 -9
- data/ext/skylight_native.c +49 -18
- data/lib/skylight.rb +35 -1
- data/lib/skylight/api.rb +4 -2
- data/lib/skylight/cli.rb +1 -1
- data/lib/skylight/cli/doctor.rb +6 -4
- data/lib/skylight/config.rb +149 -518
- data/lib/skylight/data/cacert.pem +236 -812
- data/lib/skylight/helpers.rb +5 -1
- data/lib/skylight/instrumenter.rb +10 -241
- data/lib/skylight/middleware.rb +1 -89
- data/lib/skylight/native.rb +8 -6
- data/lib/skylight/native_ext_fetcher.rb +251 -0
- data/lib/skylight/normalizers/active_job/enqueue_at.rb +2 -20
- data/lib/skylight/probes/sinatra_add_middleware.rb +22 -0
- data/lib/skylight/railtie.rb +11 -131
- data/lib/skylight/sinatra.rb +1 -5
- data/lib/skylight/trace.rb +1 -229
- data/lib/skylight/util/http.rb +3 -3
- data/lib/skylight/vendor/cli/thor/actions/directory.rb +5 -15
- data/lib/skylight/version.rb +1 -1
- metadata +114 -91
- data/lib/skylight/compat.rb +0 -76
- data/lib/skylight/core.rb +0 -149
- data/lib/skylight/deprecation.rb +0 -55
- data/lib/skylight/formatters/http.rb +0 -20
- data/lib/skylight/gc.rb +0 -107
- data/lib/skylight/normalizers.rb +0 -192
- data/lib/skylight/normalizers/action_controller/process_action.rb +0 -50
- data/lib/skylight/normalizers/action_controller/send_file.rb +0 -50
- data/lib/skylight/normalizers/action_view/render_collection.rb +0 -22
- data/lib/skylight/normalizers/action_view/render_partial.rb +0 -21
- data/lib/skylight/normalizers/action_view/render_template.rb +0 -21
- data/lib/skylight/normalizers/active_model_serializers/render.rb +0 -26
- data/lib/skylight/normalizers/active_record/instantiation.rb +0 -17
- data/lib/skylight/normalizers/active_record/sql.rb +0 -55
- data/lib/skylight/normalizers/active_support/cache.rb +0 -51
- data/lib/skylight/normalizers/active_support/cache_clear.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_decrement.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_delete.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_exist.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_fetch_hit.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_generate.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_increment.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_read.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_read_multi.rb +0 -16
- data/lib/skylight/normalizers/active_support/cache_write.rb +0 -16
- data/lib/skylight/normalizers/coach/handler_finish.rb +0 -36
- data/lib/skylight/normalizers/coach/middleware_finish.rb +0 -23
- data/lib/skylight/normalizers/couch_potato/query.rb +0 -20
- data/lib/skylight/normalizers/default.rb +0 -27
- data/lib/skylight/normalizers/elasticsearch/request.rb +0 -20
- data/lib/skylight/normalizers/faraday/request.rb +0 -38
- data/lib/skylight/normalizers/grape/endpoint.rb +0 -30
- data/lib/skylight/normalizers/grape/endpoint_render.rb +0 -26
- data/lib/skylight/normalizers/grape/endpoint_run.rb +0 -33
- data/lib/skylight/normalizers/grape/endpoint_run_filters.rb +0 -23
- data/lib/skylight/normalizers/moped/query.rb +0 -100
- data/lib/skylight/probes.rb +0 -129
- data/lib/skylight/probes/action_controller.rb +0 -64
- data/lib/skylight/probes/action_dispatch.rb +0 -30
- data/lib/skylight/probes/action_view.rb +0 -43
- data/lib/skylight/probes/active_model_serializers.rb +0 -55
- data/lib/skylight/probes/elasticsearch.rb +0 -37
- data/lib/skylight/probes/excon.rb +0 -26
- data/lib/skylight/probes/excon/middleware.rb +0 -68
- data/lib/skylight/probes/faraday.rb +0 -22
- data/lib/skylight/probes/grape.rb +0 -88
- data/lib/skylight/probes/httpclient.rb +0 -46
- data/lib/skylight/probes/middleware.rb +0 -68
- data/lib/skylight/probes/mongo.rb +0 -161
- data/lib/skylight/probes/mongoid.rb +0 -21
- data/lib/skylight/probes/moped.rb +0 -39
- data/lib/skylight/probes/net_http.rb +0 -58
- data/lib/skylight/probes/redis.rb +0 -71
- data/lib/skylight/probes/sequel.rb +0 -37
- data/lib/skylight/probes/sinatra.rb +0 -76
- data/lib/skylight/probes/tilt.rb +0 -31
- data/lib/skylight/subscriber.rb +0 -122
- data/lib/skylight/user_config.rb +0 -60
- data/lib/skylight/util.rb +0 -17
- data/lib/skylight/util/allocation_free.rb +0 -26
- data/lib/skylight/util/clock.rb +0 -54
- data/lib/skylight/util/deploy.rb +0 -132
- data/lib/skylight/util/gzip.rb +0 -21
- data/lib/skylight/util/inflector.rb +0 -112
- data/lib/skylight/util/logging.rb +0 -127
- data/lib/skylight/util/multi_io.rb +0 -21
- data/lib/skylight/util/native_ext_fetcher.rb +0 -253
- data/lib/skylight/util/platform.rb +0 -75
- data/lib/skylight/util/proxy.rb +0 -13
- data/lib/skylight/vendor/active_support/notifications.rb +0 -207
- data/lib/skylight/vendor/active_support/notifications/fanout.rb +0 -159
- data/lib/skylight/vendor/active_support/notifications/instrumenter.rb +0 -72
- data/lib/skylight/vendor/active_support/per_thread_registry.rb +0 -52
- data/lib/skylight/vendor/thread_safe.rb +0 -126
- data/lib/skylight/vendor/thread_safe/non_concurrent_cache_backend.rb +0 -133
- data/lib/skylight/vendor/thread_safe/synchronized_cache_backend.rb +0 -76
- data/lib/skylight/vm/gc.rb +0 -70
data/lib/skylight/vm/gc.rb
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
|
2
|
-
module Skylight
|
3
|
-
# @api private
|
4
|
-
module VM
|
5
|
-
if defined?(JRUBY_VERSION)
|
6
|
-
|
7
|
-
# This doesn't quite work as we would like it. I believe that the GC
|
8
|
-
# statistics includes time that is not stop-the-world, this does not
|
9
|
-
# necessarily take time away from the application.
|
10
|
-
#
|
11
|
-
# require 'java'
|
12
|
-
# class GC
|
13
|
-
# def initialize
|
14
|
-
# @factory = Java::JavaLangManagement::ManagementFactory
|
15
|
-
# end
|
16
|
-
#
|
17
|
-
# def enable
|
18
|
-
# end
|
19
|
-
#
|
20
|
-
# def total_time
|
21
|
-
# res = 0.0
|
22
|
-
#
|
23
|
-
# @factory.garbage_collector_mx_beans.each do |mx|
|
24
|
-
# res += (mx.collection_time.to_f / 1_000.0)
|
25
|
-
# end
|
26
|
-
#
|
27
|
-
# res
|
28
|
-
# end
|
29
|
-
# end
|
30
|
-
|
31
|
-
elsif defined?(::GC::Profiler)
|
32
|
-
|
33
|
-
class GC
|
34
|
-
def initialize
|
35
|
-
@total = 0
|
36
|
-
end
|
37
|
-
|
38
|
-
def enable
|
39
|
-
::GC::Profiler.enable
|
40
|
-
end
|
41
|
-
|
42
|
-
def total_time
|
43
|
-
# Reported in seconds
|
44
|
-
run = (::GC::Profiler.total_time * 1_000_000).to_i
|
45
|
-
|
46
|
-
if run > 0
|
47
|
-
::GC::Profiler.clear
|
48
|
-
end
|
49
|
-
|
50
|
-
@total += run
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
# Fallback
|
57
|
-
unless defined?(VM::GC)
|
58
|
-
|
59
|
-
class GC
|
60
|
-
def enable
|
61
|
-
end
|
62
|
-
|
63
|
-
def total_time
|
64
|
-
0
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|