Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Go SDK V2 Upgrade, Single Measure Support #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fredjoonpark
Copy link

@fredjoonpark fredjoonpark commented Feb 28, 2025

This PR upgrades the AWS go SDK used for connecting to Timestream. Added mode for toggling between single-measure and multi-measure records, including for query generation with relevant tests.

To run unit tests for generated queries, you can navigate to cmd/tsbs_generate_queries/databases/timestream and run go test -v.

Sample end-to-end flow:

  1. Generate data
tsbs_generate_data --use-case="cpu-only" --seed=123 --scale=10 \
    --timestamp-start="2025-02-17T00:00:00Z" \
    --timestamp-end="2025-02-18T00:00:00Z" \
    --log-interval="10s" --format="timestream" \
    | gzip > /tmp/timestream-data.gz

And unzip with gunzip /tmp/timestream-data.gz

  1. Generate queries

Multi-measure:

tsbs_generate_queries --use-case="cpu-only" --seed=123 --scale=10 \
    --timestamp-start="2025-02-17T00:00:00Z" \
    --timestamp-end="2025-02-18T00:00:01Z" \
    --queries=3 --query-type="high-cpu-1" --format="timestream" \
    | gzip > /tmp/timestream-queries.gz

Single-measure:

tsbs_generate_queries --use-case="cpu-only" --seed=123 --scale=10 \
    --timestamp-start="2025-02-17T00:00:00Z" \
    --timestamp-end="2025-02-18T00:00:01Z" \
    --queries=3 --query-type="high-cpu-1" --format="timestream" --timestream-use-single-measure="true" \
    | gzip > /tmp/timestream-queries.gz
  1. Generate config

Create the config with:

tsbs_load config --target=timestream --data-source=FILE

And update config values:

  • Update data source location (/tmp/timestream-data)
  • If using single-measure records, set use-single-measure-records to true
  • Increase workers (really slow with just 1)
  1. Load data
./bin/tsbs_load load timestream --config=./config.yaml
  1. Run queries
cat /tmp/timestream-queries.gz | \
    gunzip | tsbs_run_queries_timestream --workers=8

Run with --print-responses to track progress of your queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant