Files
.buildkite
.github
archiver
banking-bench
bench-exchange
bench-streamer
bench-tps
book
chacha-sys
ci
clap-utils
cli
client
core
crate-features
drone
fixed-buf
genesis
genesis-programs
gossip
install
keygen
ledger
ledger-tool
local-cluster
log-analyzer
logger
measure
merkle-tree
metrics
scripts
grafana-provisioning
.gitignore
README.md
adjust-dashboard-for-channel.py
enable.sh
grafana.ini
influxdb.conf
start.sh
status.sh
stop.sh
test.sh
src
.gitignore
Cargo.toml
README.md
create-metrics-tarball.sh
grafcli.conf
publish-metrics-dashboard.sh
multinode-demo
net
net-shaper
net-utils
perf
programs
rayon-threadlimit
runtime
scripts
sdk
sdk-c
system-test
upload-perf
validator
vote-signer
watchtower
.appveyor.yml
.clippy.toml
.codecov.yml
.gitbook.yaml
.gitignore
.mergify.yml
.travis.yml
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE
README.md
RELEASE.md
fetch-perf-libs.sh
run.sh
solana/metrics/scripts/test.sh

28 lines
612 B
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Test local metrics by sending a airdrop datapoint
#
set -e
cd "$(dirname "$0")"
# shellcheck source=metrics/scripts/enable.sh
source ./enable.sh
if [[ -z $INFLUX_DATABASE || -z $INFLUX_USERNAME || -z $INFLUX_PASSWORD ]]; then
echo Influx user credentials not found
exit 0
fi
host="https://localhost:8086"
if [[ -n $INFLUX_HOST ]]; then
host="$INFLUX_HOST"
fi
set -x
point="drone-airdrop,localmetrics=test request_amount=1i,request_current=1i"
echo "${host}/write?db=${INFLUX_DATABASE}&u=${INFLUX_USERNAME}&p={$INFLUX_PASSWORD}" \
| xargs curl -XPOST --data-binary "$point"