This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tarantool> require'tarantool' | |
--- | |
- build: &0 | |
target: Darwin-arm64-Release | |
options: cmake . -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/tarantool/2.11.0_1 | |
-DENABLE_BACKTRACE=TRUE | |
linking: dynamic | |
mod_format: dylib | |
flags: ' -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common | |
-fopenmp -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local msgpack = require 'msgpack' | |
local base64_encode = require 'digest'.base64_encode | |
local base64_decode = require 'digest'.base64_decode | |
---@alias scan.cursor string | |
---Encodes cursor to string | |
---@param index boxIndex | |
---@param tuple box.tuple | |
---@return string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---Class rmean is plain-Lua implementation of Tarantool's rmean collector | |
--- | |
---rmean provides window function mean with specified window size (default=5s) | |
---rmean well tested on 10K parallel running collectors | |
--- | |
---rmean:collect(value) is lightning fast ≈ 1B calls per second with jit.on | |
---and ≈ 15M with jit.off | |
--- | |
---rmean:mean() makes 10M calls per second with jit.off() and ≈50M calls with jit.on | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tarantool | |
-- Fill address here | |
local ADDR = "10.0.1.21:7402" | |
--- Main script goes here | |
local log = require 'log' | |
local json = require 'json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.6.9-11-gf4619d0e4 ['version', 1, 6, 8] | |
1.7.3-32-g0dd09b18b ['version', 1, 7, 2] | |
1.7.4-0-g927bd9c24 ['version', 1, 7, 2] | |
1.7.5-0-g24b70de10 ['version', 1, 7, 5] | |
1.7.6-0-g7b2945d6c ['version', 1, 7, 6] | |
1.7.6-27-g7ef5be2ee ['version', 1, 7, 6] | |
1.7.7 => 1.7.7 ??? | |
1.8.1-0-g82bebd667 ['version', 1, 7, 2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- THIS IS JUST POC, DO NOT USE IT IN PRODUCTION! | |
local metrics = require 'metrics' | |
local INF = math.huge | |
local DEFAULT_BUCKETS = {.005, .01, .025, .05, .075, .1, .25, .5, | |
.75, 1.0, 2.5, 5.0, 7.5, 10.0, INF} | |
local Counter = require 'metrics.collectors.counter' | |
local Shared = require 'metrics.collectors.shared' | |
local FastHistogram = Shared:new_class('histogram', {}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail; | |
s3_url="${S3_ENDPOINT_URL:-hb.vkcs.cloud}" | |
PROFILE="${AWS_PROFILE:-default}" | |
ACCESS_KEY="${AWS_ACCESS_KEY_ID:-}" | |
SECRET_KEY="${AWS_SECRET_ACCESS_KEY:-}" | |
REGION="${AWS_REGION:-us-east-1}" | |
INI_FILE=~/.aws/credentials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local tt_version = {} | |
do | |
local maj,min,mic,bld = _TARANTOOL:match("(%d+)%.(%d+)%.(%d+)-(%d+)") | |
if not maj then | |
maj,min,mic,bld = _TARANTOOL:match("(%d+)%.(%d+)%.(%d+)-([%w%d]+%-%d+)") | |
end | |
if not maj then | |
maj,min,mic,bld = _TARANTOOL:match("(%d+)%.(%d+)%.(%d+)-([%w%d]+)") | |
end | |
assert(maj,"Failed to parse version ".._TARANTOOL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local socket = require 'socket' | |
local fiber = require 'fiber' | |
local url = require 'uri' | |
local log = require 'log' | |
local M = {} | |
M.__index = M | |
---Creates new graphite object (by default space is temporary) | |
---@param space_name? string name of metrics space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tarantool | |
--[[ | |
gists = assert(loadstring(require"json".decode(require"http.client".get("https://api.github.com/gists/22094b6c1b2f39403fe9d0a4df9d84cf",{headers={["User-Agent"]="curl/7.86.0"}}).body).files["gist.lua"].content))() | |
]] | |
local M = {} | |
local fio = require 'fio' | |
local fun = require 'fun' | |
local uri = require 'uri' | |
local json = require 'json' |