A repository for managing and making gRPC calls using the ghz
tool.
- Getting Started
- Starting the Database
- Making gRPC Calls
- Sample Config-files Structure
- Metadata used to monitor latency
- Pictorial representation of end to end latency calculation
- building ghz for arm64 architecture
- building ghz-web for arm64 architecture
- Commands used for testing on L4S testbed
- copy report locally
- graph generator
Before you begin, ensure you have met the following requirements:
- You have
git
installed. - You have
chmod
andsudo
permissions.
To clone the repository, run:
git clone https://github.boschdevcloud.com/SAI1RNG/ghz-custom.git -b feature/main
cd ghz-custom/cmd/ghz-web
chmod +x ./ghz-web
sudo ./ghz-web
cd ghz-custom/cmd/ghz
chmod +x ./ghz
./ghz --insecure --config=config.json
./ghz --insecure --config=config_subscribe.json json
./ghz --insecure --config=config.json -O json | http POST localhost:80/api/ingest
./ghz --insecure --config=config_subscribe.json json | http POST localhost:80/api/ingest
- timeout: The amount of time the ghz is required to subscribe to kuksa-databroker
{{.RequestNumber}}
placeholder. - request_id: This acts as a identifier to differntiate between multiple tests conducted. Example:
50sub300pub
indicates an experiment with 50 subscribers and 300 publish calls, request_id can be anything helping identify between tests. - description: Provides additional information about the request. Uses the
{{.RequestNumber}}
placeholder. - fields: An array specifying data fields to be kept track of, such as
["2", "12"]
, here having "12" is a must.
Note: The combination of request_id
and description
forms a unique id for identifying a particular publish call in a given test.
- latency related metadata for publish call is recieved in the metadata of Http respone.
- latency related metadata for subscribe call is received within the payload of the subscription response.
use below docker command and inject the custom-ghz repo as a volume inside the golang docker container
docker run -it -v $PWD:/go/work golang:1.20-alpine
traverse to the cmd/ghz folder and execute below command
go build .
docker run -it -v $PWD:/go/work golang:1.20
use Docker container for building ghz-web as it requires several dependencies
from the root folder (/go/work/ghz-custom) execute the below command
apt-get install libc6
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -x -buildvcs=false -a -ldflags="-extldflags '-static' -s -w -X 'main.version=$(git rev-parse --abbrev-ref HEAD)' -X 'main.commit=$(git rev-parse HEAD)' -X 'main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)'" -o ./dist/ghz-web-custom-arm ./cmd/ghz-web/...
Starting ghz-web to collect monitoring data at (/home/nuc2rng/kuksa/likhith-kuksa-l4s/ghz-custom/cmd/ghz-web)
sudo ./ghz-web -config config.yaml
config.yaml content
server:
port: 9999
starting KUKSA at location: /home/nuc2rng/kuksa/likhith-kuksa-l4s/kuksa-databroker
docker compose up kuksa-databroker
starting ghz in location : /home/pi2rng/kuksa/ghz-custom/cmd/ghz
./ghz --insecure --config=config.json -O json | http POST 192.168.10.20:9999/api/ingest
starting ghz in location : /home/pi3rng/kuksa/ghz-custom/cmd/ghz
./ghz --insecure --config=config_subscribe.json -O json | http POST 192.168.10.20:9999/api/ingest
execute following shell script from /home/nuc2rng/kuksa/likhith-kuksa-l4s/ghz-custom/cmd/ghz-web folder : /home/nuc2rng/kuksa/likhith-kuksa-l4s/ghz-custom/cmd/ghz-web/copy-ghz-dbs-from-clients.sh
scp [email protected]:///home/pi3rng/kuksa/ghz-custom/cmd/ghz-web/data/ghz.db ./data/ghz-subscriber-info.db
scp [email protected]:///home/pi2rng/kuksa/ghz-custom/cmd/ghz-web/data/ghz.db ./data/ghz-publisher-info.db
execute below command to do merging
sudo docker run -v $PWD:/work --entrypoint "/usr/local/bin/python3" rekocd/python-pandas:3.12.0 /work/db_merger.py /work/data/ghz-subscriber-info.db /work/data/ghz-publisher-info.db /work/data/ghz.db
execute below command to do data extraction
sudo docker run -v $PWD:/work --entrypoint "/usr/local/bin/python3" rekocd/python-pandas:3.12.0 "/work/sqlite-latency-extractor_XLS.py"
scp [email protected]:///home/nuc2rng/kuksa/likhith-kuksa-l4s/ghz-custom/cmd/ghz-web/latency_and_mean_stats.xlsx .
execute below command to do graph generator in "ghz-web" folder
sudo docker run -v $PWD:/work --entrypoint "/usr/local/bin/python3" rekocd/python-pandas:3.12.0 "/work/graph-generator-multiple-files.py"