Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
require 'sneakers'
require 'sneakers/runner'
require 'byebug'
require 'oj'
class RpcServer
include Sneakers::Worker
from_queue 'downloads'
def work_with_params(deserialized_msg, delivery_info, metadata)
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@yosiat
yosiat / # sfcgal - 2018-05-10_23-56-37.txt
Created May 10, 2018 21:03
sfcgal on macOS 10.13.4 - Homebrew build logs
Homebrew build logs for sfcgal on macOS 10.13.4
Build date: 2018-05-10 23:56:37
class Worker {
private readonly ILog mLogger = Log.ForContext<Worker>();
public void Process(string messageId) {
var messageLogger = mLogger.ForContext("messageId", messageId);
messageLogger.Information("Starting to process {messageId} with {SomeVariable}", 12)
}
Showing top 10 nodes out of 164 (cum >= 180ms)
flat flat% sum% cum cum%
4170ms 31.00% 31.00% 4170ms 31.00% runtime.usleep
1130ms 8.40% 39.41% 1130ms 8.40% runtime.mach_semaphore_signal
1120ms 8.33% 47.73% 1120ms 8.33% runtime.mach_semaphore_wait
1020ms 7.58% 55.32% 1020ms 7.58% runtime.memmove
770ms 5.72% 61.04% 940ms 6.99% runtime.scanobject
680ms 5.06% 66.10% 680ms 5.06% syscall.Syscall
570ms 4.24% 70.33% 570ms 4.24% runtime.mach_semaphore_timedwait
240ms 1.78% 72.12% 970ms 7.21% runtime.mallocgc
@yosiat
yosiat / alerts.log
Created February 18, 2016 18:36
window_bug_2
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:1},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-18T18:16:09Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-18T18:16:09Z",1]]}]}}{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\
@yosiat
yosiat / ok.log
Created February 16, 2016 18:27
window bug
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:27:50Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:27:50Z",5]]}]}}
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields
@yosiat
yosiat / http_api.md
Last active February 10, 2023 21:08
kapacitor api doc