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
| -- ============================================================================= | |
| -- Test data distributions for HORIZON JOIN adaptive scan benchmarking. | |
| -- | |
| -- Each scenario generates fx_trades_* and market_data_* with different symbol | |
| -- cardinality, gap sizes, and key distributions to exercise the adaptive | |
| -- backward-to-forward scan switch. | |
| -- | |
| -- Benchmark query template (replace suffixes): | |
| -- | |
| -- SELECT t.symbol, h.offset, avg(m.best_bid), avg(m.best_ask), count(*) |
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 node | |
| /** | |
| * Flame graph analyzer for async-profiler HTML output. | |
| * | |
| * Usage: node analyze-flamegraph.js <flamegraph.html> [thread-filter] | |
| * | |
| * Examples: | |
| * node analyze-flamegraph.js flame.html # All threads | |
| * node analyze-flamegraph.js flame.html query_ # Only query worker threads | |
| * node analyze-flamegraph.js flame.html shared-network # Network threads |
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
| /******************************************************************************* | |
| * ___ _ ____ ____ | |
| * / _ \ _ _ ___ ___| |_| _ \| __ ) | |
| * | | | | | | |/ _ \/ __| __| | | | _ \ | |
| * | |_| | |_| | __/\__ \ |_| |_| | |_) | | |
| * \__\_\\__,_|\___||___/\__|____/|____/ | |
| * | |
| * Copyright (c) 2014-2019 Appsicle | |
| * Copyright (c) 2019-2024 QuestDB | |
| * |
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
| use std::hint::black_box; | |
| use std::time::Instant; | |
| const ARRAY_NDIMS_LIMIT: usize = 32; | |
| // Simple linear congruential generator for reproducible random numbers | |
| struct SimpleRng { | |
| state: u64, | |
| } |
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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "strconv" | |
| "strings" | |
| "time" |
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
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "strconv" | |
| "time" | |
| qdb "github.com/questdb/go-questdb-client" | |
| ) |
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
| public class Main { | |
| public static void main(String[] args) { | |
| int[] arr = new int[]{1, 2, 3}; | |
| for (int i = 0, n = arr.length; i < n; i++) { | |
| System.out.println(arr[i]); | |
| } | |
| for (int n : arr) { |
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
| $ go version | |
| go version go1.19.3 linux/arm64 | |
| $ go test -run='^$' -cpu=1,2,4,8,16,32,64 -bench . -count=30 -timeout=0 | tee bench.txt | |
| $ benchstat bench.txt | tee benchstat.txt | |
| name time/op | |
| Counter 27.3ns ± 1% | |
| Counter-2 27.2ns ±11% | |
| Counter-4 15.3ns ± 8% | |
| Counter-8 7.43ns ± 7% |
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
| 'use strict' | |
| const keys = [ | |
| 'TCN', | |
| 'alternate-protocol', | |
| ':', | |
| '@@', | |
| '中文呢', | |
| '((((())))', | |
| ':alternate-protocol', |
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
| interface MetricsStorage { | |
| store(dataPoints: DataPoint[]): Promise<void>; | |
| queryRange(query: Query): Promise<DataPoint[]>; | |
| queryLatest(query: Query): Promise<DataPoint | null>; | |
| } |
NewerOlder