Skip to content
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
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM golang:latest AS builder
COPY . /
WORKDIR /
RUN make

FROM ubuntu:24.10
LABEL Description="redis-benchmark-go"
COPY --from=builder /redis-benchmark-go /usr/local/bin

ENTRYPOINT ["redis-benchmark-go"]
CMD [ "--help" ]
10 changes: 6 additions & 4 deletions redis-bechmark-go.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"context"
tls "crypto/tls"
"crypto/tls"
"flag"
"fmt"
"log"
Expand Down Expand Up @@ -185,6 +185,7 @@ func main() {
username := flag.String("u", "", "Username for Redis Auth.")
password := flag.String("a", "", "Password for Redis Auth.")
enableTls := flag.Bool("tls", false, "Use TLS connection.")
tlsSkipCertCheck := flag.Bool("tls-skip", false, "Ignore TLS certificate check")
jsonOutFile := flag.String("json-out-file", "", "Results file. If empty will not save.")
seed := flag.Int64("random-seed", 12345, "random seed to be used.")
clients := flag.Uint64("c", 50, "number of clients.")
Expand Down Expand Up @@ -292,11 +293,12 @@ func main() {
alwaysRESP2 = false
}
if *enableTls {
conf := &tls.Config{
InsecureSkipVerify: *tlsSkipCertCheck,
}
opts.NetDialer = &tls.Dialer{
NetDialer: nil,
Config: &tls.Config{
ServerName: *host,
},
Config: conf,
}
}

Expand Down