From a9a25ed5a32c16008ac2eccbc2059b1a052a16a5 Mon Sep 17 00:00:00 2001 From: Natalie Serrino Date: Fri, 26 Jul 2024 14:51:22 -0700 Subject: [PATCH] Update README to give correct instructions, correct negative relative time values --- README.md | 12 ++++++------ client.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 206b9c8..454fbd1 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ This project provides a Python client for interacting with the Gimlet's control 1. Clone the repository: ```bash - git clone https://github.com/gimletlabs/metricsreader_client.git - cd metricsreader_client + git clone https://github.com/gimletlabs/metricsample.py.git + cd metricsample.py ``` 2. Install the required packages: @@ -40,15 +40,15 @@ export GML_API_KEY=your_api_key_here ``` bash python client.py [--server_addr ] [--query ] [--relative ] ``` -- --server_addr: (Optional) The address of the gRPC server (e.g., app.gimletlabs.ai:443). -- --query: (Optional) The PromQL query string (default: gml_gem_image_quality_brisque_score). -- --relative: (Optional) The relative time window to query (default: -5m). +- `--server_addr`: (Optional) The address of the gRPC server (e.g., app.gimletlabs.ai:443). +- `--query`: (Optional) The PromQL query string (default: gml_gem_image_quality_brisque_score). +- `--relative`: (Optional) The relative time window to query (default: 5m). ### Example ``` bash export GML_API_KEY=your_api_key_here -python client.py --server_addr app.gimletlabs.ai:443 --query "gml_gem_image_quality_brisque_score" --relative "-10m" +python client.py --server_addr app.gimletlabs.ai:443 --query "gml_gem_image_quality_brisque_score" --relative "10m" ``` ## Code Overview diff --git a/client.py b/client.py index f44e76c..d4231ef 100644 --- a/client.py +++ b/client.py @@ -9,7 +9,7 @@ import argparse from colored import attr, fg -def get_range_query_results(server_address, query="gml_gem_image_quality_brisque_score", relative="-5m"): +def get_range_query_results(server_address, query="gml_gem_image_quality_brisque_score", relative="5m"): # Create SSL credentials using default trusted certificates credentials = grpc.ssl_channel_credentials() channel = grpc.secure_channel(server_address, credentials)