ghz

ghz

  • CLI
  • Web
  • GoDoc
  • GitHub

›Guide

Guide

  • Introduction
  • Installation
  • Usage
  • Options Reference
  • Load Options
  • Concurrency Options
  • Call Data
  • Examples
  • Configuration Files
  • Output
  • Extras
  • Package

Package

ghz can be used programmatically as Go package within Go applications. See detailed godoc documentation. Example usage:

package main

import (
    "fmt"
    "os"

    "github.com/bojand/ghz/printer"
    "github.com/bojand/ghz/runner"
)

func main() {
    report, err := runner.Run(
        "helloworld.Greeter.SayHello",
        "localhost:50051",
        runner.WithProtoFile("greeter.proto", []string{}),
        runner.WithDataFromFile("data.json"),
        runner.WithInsecure(true),
    )

    if err != nil {
        fmt.Println(err.Error())
        os.Exit(1)
    }

    printer := printer.ReportPrinter{
        Out:    os.Stdout,
        Report: report,
    }

    printer.Print("pretty")
}
← Extras
ghz
Docs
GuideGoDoc
Community
Say Thanks! ❤️
More
GitHubStar
Copyright © 2024 Bojan D.