Skip to content

Commit

Permalink
Merge branch 'main' into geopolygon.ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed May 15, 2023
2 parents 2b59529 + ffcbed4 commit 412cdf5
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 24 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: Publish binaries to GH
# .github/workflows/github-release-publish.yml
name: Publish artifacts to github release

on:
release:
types: [ published ]
types: [published]

jobs:
publish:
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, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.36
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Make Release
run: make release
- name: Upload release binaries
uses: alexellis/upload-assets@0.3.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./dist/geo-bench_*"]'
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "geo-bench"
sha256sum: true
asset_name: geo-bench-${{ matrix.goos }}-${{ matrix.goarch }}
build_command: "make build"
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Flow tests

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.18.x, 1.19.x]

services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379

steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v3

- name: Test
run: make flowtest
60 changes: 53 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,67 @@ The benchmarks in this repository cover a range of common Redis GEO and RediSear
The results of the benchmarks can be used to compare the performance of different Redis configurations, to gain insights into the behavior of these tools, and to identify potential bottlenecks or areas for optimization.


### Try it out
## Installation

#### GeoPoints
### Download Standalone binaries ( no Golang needed )

If you don't have go on your machine and just want to use the produced binaries you can download the following prebuilt bins:

https://github.com/redis-performance/geo-bench/releases/latest

| OS | Arch | Link |
| :--- | :---: | ---: |
| Linux | amd64 (64-bit X86) | [geo-bench-linux-amd64](https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-linux-amd64.tar.gz) |
| Linux | arm64 (64-bit ARM) | [geo-bench-linux-arm64](https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-linux-arm64.tar.gz) |
| Darwin | amd64 (64-bit X86) | [geo-bench-darwin-amd64](https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-darwin-amd64.tar.gz) |
| Darwin | arm64 (64-bit ARM) | [geo-bench-darwin-arm64](https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-darwin-arm64.tar.gz) |

Here's how bash script to download and try it:

```bash
wget -c https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-$(uname -mrs | awk '{ print tolower($1) }')-$(dpkg --print-architecture).tar.gz -O - | tar -xz

# give it a try
./geo-bench --help
```

### Installation in a Golang env

The easiest way to get and install the benchmark utility with a Go Env is to use
`go get` and then `go install`:
```bash
# Fetch this repo
go get github.com/redis-performance/geo-bench
cd $GOPATH/src/github.com/redis-performance/geo-bench
make
```



## Try it out

### GeoPoints
```bash
# get dataset
wget https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geopoint/documents.json.bz2
bzip2 -d documents.json.bz2
make build
./geo-bench load
```

#### GeoPolygons
# get tool
wget -c https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-$(uname -mrs | awk '{ print tolower($1) }')-$(dpkg --print-architecture).tar.gz -O - | tar -xz

# load data
./geo-bench load
```

### GeoPolygons
```bash
# get dataset
wget https://s3.us-east-2.amazonaws.com/redis.benchmarks.spec/datasets/geoshape/polygons.json.bz2
bzip2 -d polygons.json.bz2
make build

# get tool
wget -c https://github.com/redis-performance/geo-bench/releases/latest/download/geo-bench-$(uname -mrs | awk '{ print tolower($1) }')-$(dpkg --print-architecture).tar.gz -O - | tar -xz

# load data
./geo-bench load --input-type geoshape --input polygons.json
```

0 comments on commit 412cdf5

Please sign in to comment.