-
Notifications
You must be signed in to change notification settings - Fork 4
Generate stefz files for testing #144
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/bash | ||
|
|
||
| # This script generates .stefz files from .zst files using the otlp2stef tool | ||
| # built from a specific base branch. It checks out the base branch, builds the tool, | ||
| # converts the files, and then checks out the original branch again. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Remember the current branch or commit hash if in detached HEAD state. | ||
| CUR_BRANCH=$(git symbolic-ref -q --short HEAD || git rev-parse HEAD) | ||
| echo "Remembering current branch/commit hash as $CUR_BRANCH" | ||
|
|
||
| TMPDIR=$(mktemp -d) | ||
| cp ./gentestfiles.sh "$TMPDIR/" | ||
|
|
||
| # Checkout the base branch to compare to | ||
| BASE_BRANCH=21f498a293dbdf6e29c75385ba0043dc0f5e4009 | ||
| git -c advice.detachedHead=false checkout $BASE_BRANCH | ||
|
|
||
| # Convert/generate the files. | ||
| $TMPDIR/gentestfiles.sh | ||
|
|
||
| # Checkout the previously remembered branch | ||
| git checkout "$CUR_BRANCH" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/bin/bash | ||
tigrannajaryan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # This script generates .stefz files from .zst files using the otlp2stef tool | ||
| # Generated files are placed in testdata/generated/. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Build otlp2stef tool (see makefile for how to do it) | ||
| echo | ||
| echo "Building otlp2stef tool" | ||
| go build -o ../bin/otlp2stef ../cmd/otlp2stef/main.go | ||
|
|
||
| # Copy .zst files to a temp directory | ||
| echo | ||
| echo "Converting .zst files to .stefz format using otlp2stef tool" | ||
| TMPDIR=$(mktemp -d) | ||
| cp ../testdata/astronomy-otelmetrics.zst "$TMPDIR/" | ||
| cp ../testdata/hipstershop-otelmetrics.zst "$TMPDIR/" | ||
| cp ../testdata/hostandcollector-otelmetrics.zst "$TMPDIR/" | ||
|
|
||
| # Use otlp2stef tool to convert these files to stefz format | ||
| for f in astronomy-otelmetrics hipstershop-otelmetrics hostandcollector-otelmetrics; do | ||
| ../bin/otlp2stef \ | ||
| -compression=zstd \ | ||
| --input="$TMPDIR/$f.zst" | ||
| done | ||
|
|
||
| # Copy stefz files from temp directory into testdata directory, overwriting if they exist | ||
| echo | ||
| echo "Copying converted .stefz files to ../testdata/generated/ directory" | ||
| mkdir -p "../testdata/generated/" | ||
| cp "$TMPDIR/astronomy-otelmetrics.stefz" ../testdata/generated/ | ||
| cp "$TMPDIR/hipstershop-otelmetrics.stefz" ../testdata/generated/ | ||
| cp "$TMPDIR/hostandcollector-otelmetrics.stefz" ../testdata/generated/ | ||
|
|
||
| echo "Test files generated." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| generated |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.