graph TD
A[Me] -->|Testing mermaid on| B(Github)
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
❯ 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) |
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
❯ 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) ² |
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
now=$(date +%s) | |
data=" | |
{ | |
\"resourceMetrics\": [ | |
{ | |
\"resource\": { | |
\"attributes\": [ | |
{ | |
\"key\": \"service.name\", |
Test mermaid
graph TD
A[Cortex GW] -->|GET| B(Querier)
B --> |Key Config| C(GCS)
C --> |Config| B
B -->|Config| A
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 | |
# shellcheck disable=SC2086 | |
set -eou pipefail | |
_git_token="${GIT_TOKEN:-}" | |
repo_owner="${1:-}" | |
repo_name="${2:-}" | |
git_tag="${3:-}" | |
asset_filename="${4:-}" |
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 | |
# 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} |
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 ( | |
"io/ioutil" | |
"os" | |
"github.com/sirupsen/logrus" | |
) | |
func main() { |
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)
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
# 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 |
NewerOlder