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 fiber = require 'fiber' | |
| local clock = require 'clock' | |
| local fun = require 'fun' | |
| require 'jit'.on() | |
| fiber.top_enable() | |
| local COLLECT_INTERVAL = 1 | |
| fiber.create(function() | |
| fiber.name("monitor") |
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
| {"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"fiber":{"type":"object","additionalProperties":false,"properties":{"io_collect_interval":{"type":"number","default":null},"too_long_threshold":{"type":"number","default":0.5},"top":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false}}},"slice":{"type":"object","additionalProperties":false,"properties":{"err":{"type":"number","default":1},"warn":{"type":"number","default":0.5}}},"worker_pool_threads":{"type":"number","default":4}}},"wal":{"type":"object","additionalProperties":false,"properties":{"queue_max_size":{"type":"integer","default":16777216},"dir_rescan_delay":{"type":"number","default":2},"dir":{"type":"string","default":"var/lib/{{ instance_name }}"},"ext":{"type":"object","properties":{"spaces":{"type":"object","additionalProperties":{"type":"object","additionalProperties":false,"properties":{"old":{"type":"boolean","default":false |
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
| require 'compat'.json_escape_forward_slash = 'new' | |
| local log = require 'log' | |
| local json = require 'json' | |
| local netbox = require 'net.box' | |
| local router = netbox.connect('127.0.0.1:4401') | |
| log.info("call_raw: %s", json.encode(router:call('call_raw'))) | |
| log.info("call_noraw: %s", json.encode(router:call('call_noraw'))) | |
| --[[ |
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 |