Skip to content

Instantly share code, notes, and snippets.

View jesusvazquez's full-sized avatar

Jesus Vazquez jesusvazquez

View GitHub Profile
@jesusvazquez
jesusvazquez / gist:90323f4bb976b4dd661b76c3b7c71dab
Created September 10, 2025 15:30
parquet-common benchstat june-september 2025 diff
❯ benchstat main-1249aa9 main-2854801
goos: darwin
goarch: arm64
pkg: github.com/prometheus-community/parquet-common/queryable
cpu: Apple M2 Pro
│ main-1249aa9 │ main-2854801 │
│ sec/op │ sec/op vs base │
Select/SingleMetricAllSeries-12 436.9m ± 2% 254.0m ± 6% -41.85% (p=0.002 n=6)
Select/SingleMetricReducedSeries-12 84.972m ± 2% 7.593m ± 15% -91.06% (p=0.002 n=6)
Select/SingleMetricOneSeries-12 83.497m ± 2% 6.001m ± 10% -92.81% (p=0.002 n=6)
@jesusvazquez
jesusvazquez / gist:11f3942c80c6a11d17249d15b4e395a8
Created August 29, 2025 09:45
blockstore vs parquetstore
❯ benchstat pkg/storegateway/parquetbench/tsdb-5s pkg/storegateway/parquetbench/parquet-5s
goos: darwin
goarch: arm64
pkg: github.com/grafana/mimir/pkg/storegateway/parquetbench
cpu: Apple M2 Pro
│ pkg/storegateway/parquetbench/tsdb-5s │ pkg/storegateway/parquetbench/parquet-5s │
│ sec/op │ sec/op vs base │
BucketStores_Series/SingleMetricAllSeries-12 253.8m ± ∞ ¹ 594.5m ± ∞ ¹ ~ (p=1.000 n=1) ²
BucketStores_Series/SingleMetricReducedSeries-12 3.283m ± ∞ ¹ 21.952m ± ∞ ¹ ~ (p=1.000 n=1) ²
BucketStores_Series/SingleMetricOneSeries-12 68.34µ ± ∞ ¹ 4328.06µ ± ∞ ¹ ~ (p=1.000 n=1) ²
@jesusvazquez
jesusvazquez / send-metric.sh
Created June 4, 2024 09:14
test write otlp metric with curl
now=$(date +%s)
data="
{
\"resourceMetrics\": [
{
\"resource\": {
\"attributes\": [
{
\"key\": \"service.name\",
@jesusvazquez
jesusvazquez / mermaid-test.md
Created January 14, 2022 11:52
Mermaid Test
graph TD
    A[Me] -->|Testing mermaid on| B(Github)

Test mermaid

graph TD
A[Cortex GW] -->|GET| B(Querier)
B --> |Key Config| C(GCS)
C --> |Config| B
B -->|Config| A
#!/bin/bash
# shellcheck disable=SC2086
set -eou pipefail
_git_token="${GIT_TOKEN:-}"
repo_owner="${1:-}"
repo_name="${2:-}"
git_tag="${3:-}"
asset_filename="${4:-}"
@jesusvazquez
jesusvazquez / resolve_dns_with_backoff.sh
Created March 10, 2020 12:23
Resolve DNS with exponential backoff
#!/bin/bash
# vim: ai:ts=8:sw=8:noet
# set -eufo pipefail
export SHELLOPTS # propagate set to children by default
IFS=$'\t\n'
# Performs a DNS resolution and waits until the answer has a non-empty response
function resolve_dns_with_backoff {
local timeout=${DNS_RESOLUTION_TIMEOUT-5}
local domain=${1}
@jesusvazquez
jesusvazquez / pipes.go
Created March 4, 2020 21:02
Know if a go program is receiving stdin input or not
package main
import (
"io/ioutil"
"os"
"github.com/sirupsen/logrus"
)
func main() {
@jesusvazquez
jesusvazquez / postgres-cheatsheet.md
Created May 11, 2019 19:35 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@jesusvazquez
jesusvazquez / go-tools.sh
Last active May 7, 2019 17:21
Go tools for development
# Tools for developing using go
go get golang.org/x/tools/cmd/gotype
go get github.com/securego/gosec/cmd/gosec
go get github.com/mdempsky/maligned