Skip to content

Enable benchmnark when specifying at least of RO or write query #26

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 2 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
permissions:
id-token: write # To sign.
contents: write # To upload release assets.
actions: read # To read workflow path.
strategy:
fail-fast: false
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.28
- uses: wangyoucao577/go-release-action@v1.36
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
Expand Down
7 changes: 4 additions & 3 deletions redisgraph-bechmark-go.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ func main() {
} else {
log.Printf("RTS export disabled.\n")
}
if len(benchmarkQueries) < 1 {
log.Fatalf("You need to specify at least a query with the -query parameter. For example: -query=\"CREATE (n)\"")
totalQueries := len(benchmarkQueries) + len(benchmarkQueriesRO)
if totalQueries < 1 {
log.Fatalf("You need to specify at least a query with the -query parameter or -query-ro. For example: -query=\"CREATE (n)\"")
}
log.Printf("Debug level: %d.\n", *debug)
log.Printf("Using random seed: %d.\n", *randomSeed)
Expand Down Expand Up @@ -104,7 +105,7 @@ func main() {
} else {
log.Printf("Running in loop until you hit Ctrl+C\n")
}
totalQueries := len(benchmarkQueries) + len(benchmarkQueriesRO)

queries := make([]string, totalQueries)
queryIsReadOnly := make([]bool, totalQueries)
cmdRates := make([]float64, totalQueries)
Expand Down