mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-17 10:36:34 +02:00
This change is for demo purposes, exploring the benefits (and downsides) for the complex type format for OM2 captured in https://github.com/prometheus/docs/pull/2679. This assumes Prometheus stores NS and NHCB (and NH) going forward (for best case efficiency), but is expected to work for classic mode too with little overhead (benchmarks will tell us). Part of the PromCon talk we do with @krajorama Signed-off-by: bwplotka <bwplotka@gmail.com>
26 lines
529 B
Bash
Executable File
26 lines
529 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Generate all protobuf bindings.
|
|
# Run from repository root.
|
|
set -e
|
|
set -u
|
|
|
|
if ! [[ "$0" =~ "scripts/gentextlex.sh" ]]; then
|
|
echo "must be run from repository root"
|
|
exit 255
|
|
fi
|
|
|
|
pushd "internal/tools"
|
|
INSTALL_PKGS="modernc.org/golex"
|
|
for pkg in ${INSTALL_PKGS}; do
|
|
GO111MODULE=on go install "$pkg"
|
|
done
|
|
popd
|
|
|
|
echo "generating lex code"
|
|
pushd model/textparse
|
|
golex -o=promlex.l.go promlex.l
|
|
golex -o=openmetricslex.l.go openmetricslex.l
|
|
golex -o=openmetrics2lex.l.go openmetrics2lex.l
|
|
popd
|