Skip to content

Commit

Permalink
Merge pull request #32 from hojabri/gohojabri
Browse files Browse the repository at this point in the history
Correction of some typos
  • Loading branch information
elmacnifico authored Apr 18, 2020
2 parents 31b4427 + a46d5b9 commit 63e11dd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ type Config struct {
var (
numThreads = flag.Int("t", 1, "the numbers of threads used")
method = flag.String("m", "GET", "the http request method")
requestBody = flag.String("b", "", "the http requst body")
requestBodyFile = flag.String("p", "", "the http requst body data file")
requestBody = flag.String("b", "", "the http request body")
requestBodyFile = flag.String("p", "", "the http request body data file")
numConnections = flag.Int("c", 100, "the max numbers of connections used")
totalCalls = flag.Int("n", 1000, "the total number of calls processed")
disableKeepAlives = flag.Bool("k", true, "if keep-alives are disabled")
dist = flag.String("d", "", "dist mode")
configFile = flag.String("f", "", "json config file")
config Config
target string
headers = flag.String("H", "User-Agent: go-wrk 0.1 bechmark\nContent-Type: text/html;", "the http headers sent separated by '\\n'")
headers = flag.String("H", "User-Agent: go-wrk 0.1 benchmark\nContent-Type: text/html;", "the http headers sent separated by '\\n'")
certFile = flag.String("cert", "someCertFile", "A PEM eoncoded certificate file.")
keyFile = flag.String("key", "someKeyFile", "A PEM encoded private key file.")
caFile = flag.String("CA", "someCertCAFile", "A PEM eoncoded CA's certificate file.")
insecure = flag.Bool("i", false, "TLS checks are disabled")
respContains = flag.String("s", "", "if specified, it counts how often the searched string s is contained in the responses")
readAll = flag.Bool("r", false, "in the case of having stream or file in the response,\n it reads all response body to calculate the response size")
)

func init() {
Expand Down Expand Up @@ -77,6 +78,10 @@ func setRequestBody() {
}

func main() {
if len(os.Args) == 1 { //If no argument specified
flag.Usage() //Print usage
os.Exit(1)
}
setRequestBody()
switch *dist {
case "m":
Expand Down

0 comments on commit 63e11dd

Please sign in to comment.