rails c
while true do
r = nil
duration = Benchmark.ms do
r = Cassie.session.execute("select count(*) from system.hints")
end
rails c
while true do
r = nil
duration = Benchmark.ms do
r = Cassie.session.execute("select count(*) from system.hints")
end
# Emit key statistics about locally running Sidekiq processes to a stream. | |
# | |
require 'sidekiq/api' | |
class SidekiqProcessesPrinter | |
attr_reader :format | |
def initialize(opts={}) | |
@format = opts.fetch(:format){:plain} | |
end |
require 'puma' | |
require 'puma/control_cli' | |
require 'json' | |
class PumaWorkersPrinter | |
attr_reader :format | |
def initialize(opts={}) | |
@format = opts.fetch(:format){ :plain } | |
@password = opts.fetch(:password){ '' } |
{ | |
"script": { | |
"inline": "doc['system.memory.used.bytes'].value / 1024 / 1024", | |
"lang": "painless" | |
} | |
} |
class Foo | |
def bar | |
:object_method | |
end | |
end | |
f = Foo.new | |
f.bar | |
# => :object_method |
class Foo
def bar
:object_method
end
end
f = Foo.new
f.bar
http://metalgeek.com/static/deflection.php
MoE: 29,700,000 psi (mechanical tubing) Ends: Fixed
fraction | decimal |
---|---|
1/128 | 0.008 |
module S3DirectUploading | |
extend ActiveSupport::Concern | |
included do | |
S3_UPLOAD_BUCKET = Aws::S3::Resource.new.bucket(ENV['S3_UPLOAD_BUCKET']) | |
helper_method :build_s3_direct_post | |
end | |
protected |