rearview 1.0.2.rc.4-jruby → 1.0.3.rc.1-jruby
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/templates/rearview.rb +14 -3
- data/lib/rearview.rb +12 -1
- data/lib/rearview/configuration.rb +8 -1
- data/lib/rearview/engine.rb +4 -1
- data/lib/rearview/ext/numeric.rb +8 -0
- data/lib/rearview/stats_service.rb +22 -0
- data/lib/rearview/stats_task.rb +51 -0
- data/lib/rearview/statsd.rb +11 -0
- data/lib/rearview/templates/utilities.rb +13 -10
- data/lib/rearview/version.rb +1 -1
- data/lib/rearview/vm.rb +69 -0
- data/spec/data/metric_b.dat +2 -2
- data/spec/dummy/config/database.yml +3 -3
- data/spec/dummy/log/development.log +72 -0
- data/spec/dummy/log/test.log +11050 -0
- data/spec/lib/rearview/configuration_spec.rb +10 -0
- data/spec/lib/rearview/stats_service_spec.rb +43 -0
- data/spec/lib/rearview/stats_task_spec.rb +45 -0
- data/spec/lib/rearview/statsd_spec.rb +20 -0
- data/spec/lib/rearview/templates/utilities_spec.rb +4 -5
- data/spec/lib/rearview/vm_spec.rb +79 -0
- data/spec/spec_helper.rb +2 -1
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce33a4e10c1dd4c3fe6d940f610673d590578607
|
4
|
+
data.tar.gz: 117613590526a62d88620c8568e89d77f48ad863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 756c8909ec2fe1f5f7b03b3afcaad0ae91bec46717645c2b8022e228df7448f744cc7c8ed14094c317470e9fb9498314d9ff3a9bdaa5ec35b3674c58ee40e241
|
7
|
+
data.tar.gz: 352a54c8c209c6ee12fac82e3fb56f3502c75f5ca0547ff5c6b276387185607ecefed623e281d952b8bfff2880a8189bd23c7539a6c53a196ca962cdd04ba17b
|
@@ -40,10 +40,20 @@ Rearview.configure do |config|
|
|
40
40
|
config.default_from = "rearview@localhost"
|
41
41
|
|
42
42
|
# The url options for rearview application host. Required to generate
|
43
|
-
#
|
43
|
+
# monitor alerts with correct URL references.
|
44
44
|
# ex:
|
45
|
-
# config.default_url_options = {:
|
46
|
-
config.default_url_options = {:
|
45
|
+
# config.default_url_options = { host: 'rearview.mycomopany.com', protocol: 'https'}
|
46
|
+
config.default_url_options = { host: 'localhost', port: '3000'}
|
47
|
+
|
48
|
+
# Enable collection of stats for rearview itself. This will send JVM and monitor related
|
49
|
+
# stats to graphite using statsd.
|
50
|
+
#
|
51
|
+
config.enable_stats=false
|
52
|
+
|
53
|
+
# The connection information for the stats service. Only necessary if enable_stats is true.
|
54
|
+
# ex:
|
55
|
+
# config.statsd_connection = { host: 'statsd.mycompany.com', port: 8125 , namespace: 'rearview' }
|
56
|
+
#
|
47
57
|
|
48
58
|
case Rails.env
|
49
59
|
when "test"
|
@@ -56,6 +66,7 @@ Rearview.configure do |config|
|
|
56
66
|
|
57
67
|
if File.basename($0) == "rake"
|
58
68
|
config.enable_monitor = false
|
69
|
+
config.enable_stats = false
|
59
70
|
end
|
60
71
|
|
61
72
|
# Options passed via environment will override anything else set to this point...
|
data/lib/rearview.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "rearview/engine"
|
2
2
|
require "rearview/concerns"
|
3
3
|
require "rearview/ext/state_machine"
|
4
|
+
require "rearview/ext/numeric"
|
4
5
|
require "rearview/constants_module_maker"
|
5
6
|
require 'rearview/logger'
|
6
7
|
require 'rearview/cron_helper'
|
@@ -15,13 +16,17 @@ require 'rearview/distribute'
|
|
15
16
|
require 'rearview/monitor_supervisor'
|
16
17
|
require 'rearview/monitor_service'
|
17
18
|
require 'rearview/configuration'
|
19
|
+
require 'rearview/vm'
|
20
|
+
require 'rearview/statsd'
|
21
|
+
require 'rearview/stats_task'
|
22
|
+
require 'rearview/stats_service'
|
18
23
|
require 'rearview/version'
|
19
24
|
|
20
25
|
module Rearview
|
21
26
|
include Rearview::Logger
|
22
27
|
|
23
28
|
class << self
|
24
|
-
attr_accessor :monitor_service,:alert_clients
|
29
|
+
attr_accessor :monitor_service,:stats_service,:alert_clients
|
25
30
|
end
|
26
31
|
|
27
32
|
module_function
|
@@ -64,6 +69,12 @@ module Rearview
|
|
64
69
|
else
|
65
70
|
logger.warn "[#{self}] monitor disabled"
|
66
71
|
end
|
72
|
+
if config.stats_enabled?
|
73
|
+
logger.info "[#{self}] starting up stats service"
|
74
|
+
@stats_service = Rearview::StatsService.supervise
|
75
|
+
@stats_service.actors.first.startup
|
76
|
+
end
|
77
|
+
|
67
78
|
@alert_clients = Rearview::Alerts.registry.values
|
68
79
|
@booted = true
|
69
80
|
end
|
@@ -46,7 +46,7 @@ module Rearview
|
|
46
46
|
ATTRIBUTES = [:default_from, :graphite_url, :pagerduty_url, :sandbox_exec,
|
47
47
|
:sandbox_timeout, :sandbox_dir, :enable_alerts, :preload_jobs,
|
48
48
|
:logger, :enable_monitor, :verify, :default_url_options,
|
49
|
-
:authentication]
|
49
|
+
:authentication, :enable_stats, :statsd_connection]
|
50
50
|
|
51
51
|
attr_accessor *ATTRIBUTES
|
52
52
|
|
@@ -58,6 +58,7 @@ module Rearview
|
|
58
58
|
validates :sandbox_exec, presence: true
|
59
59
|
validates :sandbox_timeout, presence: true, numericality: { greater_than: 4 }
|
60
60
|
validates :authentication, presence: true
|
61
|
+
validates :statsd_connection, presence: true, if: -> { self.stats_enabled? }
|
61
62
|
|
62
63
|
validate :validate_sandbox_execution
|
63
64
|
|
@@ -69,6 +70,8 @@ module Rearview
|
|
69
70
|
@verify = false
|
70
71
|
@enable_monitor = true
|
71
72
|
@authentication = { strategy: :database }
|
73
|
+
@enable_stats = false
|
74
|
+
@default_url_options = {:host=>"localhost",:port=>"3000"}
|
72
75
|
@pagerduty_url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
|
73
76
|
super
|
74
77
|
end
|
@@ -85,6 +88,10 @@ module Rearview
|
|
85
88
|
preload_jobs
|
86
89
|
end
|
87
90
|
|
91
|
+
def stats_enabled?
|
92
|
+
enable_stats
|
93
|
+
end
|
94
|
+
|
88
95
|
def verify?
|
89
96
|
verify
|
90
97
|
end
|
data/lib/rearview/engine.rb
CHANGED
@@ -7,6 +7,7 @@ require 'protected_attributes'
|
|
7
7
|
require 'httparty'
|
8
8
|
require 'celluloid'
|
9
9
|
require 'jbuilder'
|
10
|
+
require 'statsd'
|
10
11
|
|
11
12
|
jar_dir = File.expand_path('../../jar', __FILE__)
|
12
13
|
for jar in Dir["#{jar_dir}/*.jar"]
|
@@ -31,6 +32,8 @@ module Rearview
|
|
31
32
|
initializer 'devise.use_rearview_helpers' do |app|
|
32
33
|
Devise::SessionsController.class_eval { helper Rearview::ApplicationHelper }
|
33
34
|
end
|
34
|
-
|
35
|
+
initializer 'jbuilder.key_format' do |app|
|
36
|
+
Jbuilder.key_format :camelize => :lower
|
37
|
+
end
|
35
38
|
end
|
36
39
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Rearview
|
2
|
+
class StatsService
|
3
|
+
class StatsServiceError < StandardError; end;
|
4
|
+
include Celluloid
|
5
|
+
include Rearview::Logger
|
6
|
+
def statsd
|
7
|
+
@statsd ||= Rearview::Statsd.new
|
8
|
+
end
|
9
|
+
def started?
|
10
|
+
@started
|
11
|
+
end
|
12
|
+
def startup
|
13
|
+
raise StatsServiceError.new("service already started") if started?
|
14
|
+
@started = true
|
15
|
+
@stats_task = Rearview::StatsTask.supervise
|
16
|
+
end
|
17
|
+
def shutdown
|
18
|
+
raise StatsServiceError.new("service not started") unless started?
|
19
|
+
@stats_task.actors.first.terminate
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
module Rearview
|
4
|
+
class StatsTask
|
5
|
+
class StatsTaskError < StandardError; end;
|
6
|
+
include Celluloid
|
7
|
+
include Celluloid::Logger
|
8
|
+
attr_reader :delay, :statsd
|
9
|
+
def initialize(delay=120,start=true)
|
10
|
+
@delay = delay
|
11
|
+
@statsd = Rearview::Statsd.new
|
12
|
+
# This number is not documented well. The batch size is actually the max
|
13
|
+
# number of batch calls allowed, before the UDP message is sent. Anything
|
14
|
+
# after this value is quietly dropped. However, keep in mind that the
|
15
|
+
# safest max UDP message size is 512.
|
16
|
+
#
|
17
|
+
# So make sure that batch_size * 8bytes/per int < 512
|
18
|
+
@statsd.batch_size = 11
|
19
|
+
schedule if start
|
20
|
+
end
|
21
|
+
|
22
|
+
def schedule
|
23
|
+
debug "#{self} schedule"
|
24
|
+
@timer = after(@delay) { self.run }
|
25
|
+
end
|
26
|
+
|
27
|
+
def run
|
28
|
+
debug "#{self} run"
|
29
|
+
vm = Rearview::Vm.new
|
30
|
+
@statsd.batch do |batch|
|
31
|
+
batch.gauge('vm.total_memory',vm.total_memory.bytes_to_kilobytes)
|
32
|
+
batch.gauge('vm.free_memory',vm.free_memory.bytes_to_kilobytes)
|
33
|
+
batch.gauge('vm.max_memory',vm.max_memory.bytes_to_kilobytes)
|
34
|
+
batch.gauge('vm.heap.committed',vm.heap.committed.bytes_to_kilobytes)
|
35
|
+
batch.gauge('vm.heap.init',vm.heap.init.bytes_to_kilobytes)
|
36
|
+
batch.gauge('vm.heap.max',vm.heap.max.bytes_to_kilobytes)
|
37
|
+
batch.gauge('vm.heap.used',vm.heap.used.bytes_to_kilobytes)
|
38
|
+
batch.gauge('vm.non_heap.committed',vm.non_heap.committed.bytes_to_kilobytes)
|
39
|
+
batch.gauge('vm.non_heap.init',vm.non_heap.init.bytes_to_kilobytes)
|
40
|
+
batch.gauge('vm.non_heap.max',vm.non_heap.max.bytes_to_kilobytes)
|
41
|
+
batch.gauge('vm.non_heap.used',vm.non_heap.used.bytes_to_kilobytes)
|
42
|
+
end
|
43
|
+
rescue
|
44
|
+
error "#{self} run failed: #{$!}\n#{$@.join("\n")}"
|
45
|
+
ensure
|
46
|
+
schedule
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
@@ -59,9 +59,9 @@ module MonitorUtilities
|
|
59
59
|
# checks for a deployment and if found returns data before and after the deploy along with the delta
|
60
60
|
def deploy_check(num_points, deploy, metric)
|
61
61
|
if metric == deploy
|
62
|
-
raise "You've passed the deploy metric to be analyzed against itself, which is not a valid analysis."
|
62
|
+
raise "Error: You've passed the deploy metric to be analyzed against itself, which is not a valid analysis."
|
63
63
|
elsif metric.values.size < (num_points * 2) + 1
|
64
|
-
raise "Not enough data to evaluate. There must be #{num_points} data points before and after a deploy."
|
64
|
+
raise "Error: Not enough data to evaluate. There must be #{num_points} data points before and after a deploy."
|
65
65
|
else
|
66
66
|
results = []
|
67
67
|
last_deploy = deploy.values.rindex { |v| !v.nil? }
|
@@ -83,18 +83,21 @@ module MonitorUtilities
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
|
87
|
-
"#{metric.label} experienced a standard deviation shift of #{actual.round(2)}, which is greater than the threshold of #{tolerance}."
|
88
|
-
end
|
89
|
-
|
86
|
+
# determines delta in standard deviation between 2 data sets
|
90
87
|
def collect_comparisons(metric)
|
91
|
-
five_minute_sv = metric.values.each_slice(
|
92
|
-
five_minute_sv.each_slice(2).to_a.map { |pair| pair.sort }.map { |pair| pair[1] - pair[0] }
|
88
|
+
five_minute_sv = metric.values.each_slice(metric.values.length / 2).to_a.map { |pair| pair.stdev }
|
89
|
+
five_minute_sv.each_slice(2).to_a.map { |pair| pair.sort }.map { |pair| pair[1].to_f - pair[0].to_f }
|
93
90
|
end
|
94
91
|
|
92
|
+
# checks standard deviation delta for metric(s) and returns metric label delta if > deviation
|
95
93
|
def collect_aberrations(*metrics, deviation)
|
96
|
-
metrics.
|
97
|
-
|
94
|
+
if metrics.first.values.length % 2 == 1
|
95
|
+
raise "ERROR: collect_aberrations expects an even number of data points and you passed in #{metrics.first.values.length}"
|
96
|
+
end
|
97
|
+
aberrations = {}
|
98
|
+
metrics.each do |m|
|
99
|
+
collect_comparisons(m).inject(aberrations) { |hash, delta| hash[m.label] = delta if delta >= deviation; hash }
|
98
100
|
end
|
101
|
+
aberrations
|
99
102
|
end
|
100
103
|
end # Class end
|
data/lib/rearview/version.rb
CHANGED
data/lib/rearview/vm.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
java_import "java.lang.Runtime"
|
3
|
+
java_import "java.lang.management.ManagementFactory"
|
4
|
+
|
5
|
+
module Rearview
|
6
|
+
class Vm
|
7
|
+
extend Forwardable
|
8
|
+
|
9
|
+
# init:
|
10
|
+
# The initial amount of memory (bytes) that the Java virtual machine
|
11
|
+
# requests from the operating system for memory management during startup.
|
12
|
+
#
|
13
|
+
# used:
|
14
|
+
# The amount of memory currently used (bytes)
|
15
|
+
#
|
16
|
+
# committed:
|
17
|
+
# represents the amount of memory (bytes) that is guaranteed to be
|
18
|
+
# available for use by the Java virtual machine.
|
19
|
+
#
|
20
|
+
# max:
|
21
|
+
# represents the maximum amount of memory (bytes) that can be used for memory
|
22
|
+
# management
|
23
|
+
class Memory
|
24
|
+
extend Forwardable
|
25
|
+
attr_accessor :memory_bean
|
26
|
+
def_delegators :@memory_bean,:committed,:init,:max,:used
|
27
|
+
end
|
28
|
+
|
29
|
+
# The JVM has a heap that is the runtime memory from which all class instances
|
30
|
+
# and arrays are allocated.
|
31
|
+
class Heap < Memory
|
32
|
+
def initialize
|
33
|
+
@memory_bean = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# The JVM manages additional memory that is not part of the heap. This memory
|
38
|
+
# is used for things like per-class structures such as a runtime constant pool,
|
39
|
+
# field and method data, and the code for methods and constructors.
|
40
|
+
class NonHeap < Memory
|
41
|
+
def initialize
|
42
|
+
@memory_bean = ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def initialize
|
47
|
+
@runtime = Runtime.getRuntime()
|
48
|
+
end
|
49
|
+
|
50
|
+
# total_memory:
|
51
|
+
# The total amount of memory currently available for current and future objects (bytes)
|
52
|
+
#
|
53
|
+
# max_memory:
|
54
|
+
# The maximum amount of memory that the virtual machine will attempt to use (bytes)
|
55
|
+
#
|
56
|
+
# free_meory:
|
57
|
+
# An approximation to the total amount of memory currently available for future allocated objects (bytes)
|
58
|
+
def_delegators :@runtime, :total_memory, :free_memory, :max_memory
|
59
|
+
|
60
|
+
def heap
|
61
|
+
@heap ||= Heap.new
|
62
|
+
end
|
63
|
+
|
64
|
+
def non_heap
|
65
|
+
@non_heap ||= NonHeap.new
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
data/spec/data/metric_b.dat
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
development:
|
2
2
|
adapter: mysql
|
3
|
-
database:
|
3
|
+
database: rearview_ruby_development
|
4
4
|
username: root
|
5
5
|
password:
|
6
6
|
host: localhost
|
7
7
|
|
8
8
|
test:
|
9
9
|
adapter: mysql
|
10
|
-
database:
|
10
|
+
database: rearview_ruby_test
|
11
11
|
username: root
|
12
12
|
password:
|
13
13
|
host: localhost
|
14
14
|
|
15
15
|
production:
|
16
16
|
adapter: mysql
|
17
|
-
database:
|
17
|
+
database: rearview_ruby_production
|
18
18
|
username: root
|
19
19
|
password:
|
20
20
|
host: localhost
|
@@ -149,3 +149,75 @@
|
|
149
149
|
[1m[35m (12.0ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
150
150
|
[1m[36m (2.0ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
151
151
|
[1m[35m (2.0ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131106162900')
|
152
|
+
[1m[36m (85.0ms)[0m [1mDROP DATABASE IF EXISTS `rearview_dummy_test`[0m
|
153
|
+
[1m[35m (13.0ms)[0m CREATE DATABASE `rearview_dummy_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
154
|
+
[1m[36m (29.0ms)[0m [1mCREATE TABLE `applications` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255) NOT NULL, `created_at` datetime, `updated_at` datetime, `deleted_at` datetime, `ancestry` varchar(255), `description` varchar(255)) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
155
|
+
[1m[35m (16.0ms)[0m CREATE INDEX `index_applications_on_ancestry` ON `applications` (`ancestry`)
|
156
|
+
[1m[36m (10.0ms)[0m [1mCREATE INDEX `user_id` ON `applications` (`user_id`)[0m
|
157
|
+
[1m[35m (11.0ms)[0m CREATE TABLE `job_data` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `data` longtext NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
158
|
+
[1m[36m (8.0ms)[0m [1mCREATE TABLE `job_errors` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11), `created_at` datetime, `message` longtext, `status` varchar(255), `last_alerted_at` datetime, `updated_at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
159
|
+
[1m[35m (10.0ms)[0m CREATE INDEX `job_id` ON `job_errors` (`job_id`)
|
160
|
+
[1m[36m (13.0ms)[0m [1mCREATE TABLE `jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `name` varchar(255) NOT NULL, `active` tinyint(1) DEFAULT 1 NOT NULL, `last_run` datetime, `cron_expr` varchar(1024) NOT NULL, `status` varchar(255), `user_id` int(11), `alert_keys` text, `deleted_at` datetime, `error_timeout` int(11) DEFAULT 60 NOT NULL, `next_run` datetime, `description` text, `app_id` int(11) NOT NULL, `metrics` text NOT NULL, `monitor_expr` text, `minutes` int(11), `to_date` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
161
|
+
[1m[35m (11.0ms)[0m CREATE INDEX `app_id` ON `jobs` (`app_id`)
|
162
|
+
[1m[36m (11.0ms)[0m [1mCREATE UNIQUE INDEX `id_name_version_key` ON `jobs` (`id`, `name`)[0m
|
163
|
+
[1m[35m (17.0ms)[0m CREATE INDEX `jobs_ibfk_1` ON `jobs` (`user_id`)
|
164
|
+
[1m[36m (15.0ms)[0m [1mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `email` varchar(255) NOT NULL, `first_name` varchar(255), `last_name` varchar(255), `last_login` datetime, `preferences` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
165
|
+
[1m[35m (8.0ms)[0m CREATE UNIQUE INDEX `email` ON `users` (`email`)
|
166
|
+
[1m[36m (8.0ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
167
|
+
[1m[35m (13.0ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
168
|
+
[1m[36m (1.0ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
169
|
+
[1m[35m (1.0ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131106162900')
|
170
|
+
[1m[36m (7.0ms)[0m [1mDROP DATABASE IF EXISTS `rearview_dummy_test`[0m
|
171
|
+
[1m[35m (2.0ms)[0m CREATE DATABASE `rearview_dummy_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
172
|
+
[1m[36m (54.0ms)[0m [1mCREATE TABLE `applications` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255) NOT NULL, `created_at` datetime, `updated_at` datetime, `deleted_at` datetime, `ancestry` varchar(255), `description` varchar(255)) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
173
|
+
[1m[35m (9.0ms)[0m CREATE INDEX `index_applications_on_ancestry` ON `applications` (`ancestry`)
|
174
|
+
[1m[36m (19.0ms)[0m [1mCREATE INDEX `user_id` ON `applications` (`user_id`)[0m
|
175
|
+
[1m[35m (14.0ms)[0m CREATE TABLE `job_data` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `data` longtext NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
176
|
+
[1m[36m (9.0ms)[0m [1mCREATE TABLE `job_errors` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11), `created_at` datetime, `message` longtext, `status` varchar(255), `last_alerted_at` datetime, `updated_at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
177
|
+
[1m[35m (12.0ms)[0m CREATE INDEX `job_id` ON `job_errors` (`job_id`)
|
178
|
+
[1m[36m (10.0ms)[0m [1mCREATE TABLE `jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `name` varchar(255) NOT NULL, `active` tinyint(1) DEFAULT 1 NOT NULL, `last_run` datetime, `cron_expr` varchar(1024) NOT NULL, `status` varchar(255), `user_id` int(11), `alert_keys` text, `deleted_at` datetime, `error_timeout` int(11) DEFAULT 60 NOT NULL, `next_run` datetime, `description` text, `app_id` int(11) NOT NULL, `metrics` text NOT NULL, `monitor_expr` text, `minutes` int(11), `to_date` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
179
|
+
[1m[35m (13.0ms)[0m CREATE INDEX `app_id` ON `jobs` (`app_id`)
|
180
|
+
[1m[36m (10.0ms)[0m [1mCREATE UNIQUE INDEX `id_name_version_key` ON `jobs` (`id`, `name`)[0m
|
181
|
+
[1m[35m (9.0ms)[0m CREATE INDEX `jobs_ibfk_1` ON `jobs` (`user_id`)
|
182
|
+
[1m[36m (9.0ms)[0m [1mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `email` varchar(255) NOT NULL, `first_name` varchar(255), `last_name` varchar(255), `last_login` datetime, `preferences` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
183
|
+
[1m[35m (8.0ms)[0m CREATE UNIQUE INDEX `email` ON `users` (`email`)
|
184
|
+
[1m[36m (17.0ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
185
|
+
[1m[35m (11.0ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
186
|
+
[1m[36m (2.0ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
187
|
+
[1m[35m (1.0ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131106162900')
|
188
|
+
[1m[36m (108.0ms)[0m [1mDROP DATABASE IF EXISTS `rearview_ruby_test`[0m
|
189
|
+
[1m[35m (8.0ms)[0m CREATE DATABASE `rearview_ruby_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
190
|
+
[1m[36m (39.0ms)[0m [1mCREATE TABLE `applications` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255) NOT NULL, `created_at` datetime, `updated_at` datetime, `deleted_at` datetime, `ancestry` varchar(255), `description` varchar(255)) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
191
|
+
[1m[35m (9.0ms)[0m CREATE INDEX `index_applications_on_ancestry` ON `applications` (`ancestry`)
|
192
|
+
[1m[36m (19.0ms)[0m [1mCREATE INDEX `user_id` ON `applications` (`user_id`)[0m
|
193
|
+
[1m[35m (17.0ms)[0m CREATE TABLE `job_data` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `data` longtext NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
194
|
+
[1m[36m (9.0ms)[0m [1mCREATE TABLE `job_errors` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11), `created_at` datetime, `message` longtext, `status` varchar(255), `last_alerted_at` datetime, `updated_at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
195
|
+
[1m[35m (10.0ms)[0m CREATE INDEX `job_id` ON `job_errors` (`job_id`)
|
196
|
+
[1m[36m (8.0ms)[0m [1mCREATE TABLE `jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `name` varchar(255) NOT NULL, `active` tinyint(1) DEFAULT 1 NOT NULL, `last_run` datetime, `cron_expr` varchar(1024) NOT NULL, `status` varchar(255), `user_id` int(11), `alert_keys` text, `deleted_at` datetime, `error_timeout` int(11) DEFAULT 60 NOT NULL, `next_run` datetime, `description` text, `app_id` int(11) NOT NULL, `metrics` text NOT NULL, `monitor_expr` text, `minutes` int(11), `to_date` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
197
|
+
[1m[35m (11.0ms)[0m CREATE INDEX `app_id` ON `jobs` (`app_id`)
|
198
|
+
[1m[36m (10.0ms)[0m [1mCREATE UNIQUE INDEX `id_name_version_key` ON `jobs` (`id`, `name`)[0m
|
199
|
+
[1m[35m (8.0ms)[0m CREATE INDEX `jobs_ibfk_1` ON `jobs` (`user_id`)
|
200
|
+
[1m[36m (14.0ms)[0m [1mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `email` varchar(255) NOT NULL, `first_name` varchar(255), `last_name` varchar(255), `last_login` datetime, `preferences` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
201
|
+
[1m[35m (12.0ms)[0m CREATE UNIQUE INDEX `email` ON `users` (`email`)
|
202
|
+
[1m[36m (9.0ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
203
|
+
[1m[35m (15.0ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
204
|
+
[1m[36m (1.0ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
205
|
+
[1m[35m (1.0ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131106162900')
|
206
|
+
[1m[36m (12.0ms)[0m [1mDROP DATABASE IF EXISTS `rearview_ruby_test`[0m
|
207
|
+
[1m[35m (1.0ms)[0m CREATE DATABASE `rearview_ruby_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
208
|
+
[1m[36m (10.0ms)[0m [1mCREATE TABLE `applications` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255) NOT NULL, `created_at` datetime, `updated_at` datetime, `deleted_at` datetime, `ancestry` varchar(255), `description` varchar(255)) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
209
|
+
[1m[35m (10.0ms)[0m CREATE INDEX `index_applications_on_ancestry` ON `applications` (`ancestry`)
|
210
|
+
[1m[36m (9.0ms)[0m [1mCREATE INDEX `user_id` ON `applications` (`user_id`)[0m
|
211
|
+
[1m[35m (15.0ms)[0m CREATE TABLE `job_data` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11) DEFAULT 0 NOT NULL, `created_at` datetime, `updated_at` datetime, `data` longtext NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
212
|
+
[1m[36m (7.0ms)[0m [1mCREATE TABLE `job_errors` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `job_id` int(11), `created_at` datetime, `message` longtext, `status` varchar(255), `last_alerted_at` datetime, `updated_at` datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
213
|
+
[1m[35m (8.0ms)[0m CREATE INDEX `job_id` ON `job_errors` (`job_id`)
|
214
|
+
[1m[36m (14.0ms)[0m [1mCREATE TABLE `jobs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `name` varchar(255) NOT NULL, `active` tinyint(1) DEFAULT 1 NOT NULL, `last_run` datetime, `cron_expr` varchar(1024) NOT NULL, `status` varchar(255), `user_id` int(11), `alert_keys` text, `deleted_at` datetime, `error_timeout` int(11) DEFAULT 60 NOT NULL, `next_run` datetime, `description` text, `app_id` int(11) NOT NULL, `metrics` text NOT NULL, `monitor_expr` text, `minutes` int(11), `to_date` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
215
|
+
[1m[35m (10.0ms)[0m CREATE INDEX `app_id` ON `jobs` (`app_id`)
|
216
|
+
[1m[36m (9.0ms)[0m [1mCREATE UNIQUE INDEX `id_name_version_key` ON `jobs` (`id`, `name`)[0m
|
217
|
+
[1m[35m (9.0ms)[0m CREATE INDEX `jobs_ibfk_1` ON `jobs` (`user_id`)
|
218
|
+
[1m[36m (16.0ms)[0m [1mCREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` datetime, `encrypted_password` varchar(255) DEFAULT '' NOT NULL, `email` varchar(255) NOT NULL, `first_name` varchar(255), `last_name` varchar(255), `last_login` datetime, `preferences` text) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
219
|
+
[1m[35m (9.0ms)[0m CREATE UNIQUE INDEX `email` ON `users` (`email`)
|
220
|
+
[1m[36m (13.0ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8[0m
|
221
|
+
[1m[35m (11.0ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
222
|
+
[1m[36m (1.0ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
223
|
+
[1m[35m (1.0ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131106162900')
|