bench

package
v0.0.0-...-d17dd5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2014 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent   = "ISUCON Agent 2013"
	UserScale   = 400
	Timeout     = int64(10000)
	MaxFails    = 5
	SessionName = "isucon_session"
	MaxCheckers = 4
)

Variables

View Source
var AccessLog = false
View Source
var DictWords = []string{}/* 76205 elements not displayed */
View Source
var StaticFiles = map[string]string{
	"/css/bootstrap-responsive.min.css": "f889adb0886162aa4ceab5ff6338d888",
	"/css/bootstrap.min.css":            "4082271c7f87b09c7701ffe554e61edd",
	"/js/jquery.min.js":                 "628072e7212db1e8cdacb22b21752cda",
	"/js/bootstrap.min.js":              "d700a93337122b390b90bbfe21e64f71",
}

Functions

func NewPostRequest

func NewPostRequest(uri string, data url.Values) (req *http.Request)

Types

type Client

type Client struct {
	Id                 int
	Client             *http.Client
	Transport          *http.Transport
	Result             *Result
	Running            bool
	Username           *string
	SleepAfterRedirect int64
	Token              string
	Endpoint           string
	IsChecker          bool
	TotalMemos         int
}

func NewClient

func NewClient(id int) *Client

func (*Client) Crawl

func (c *Client) Crawl(endpoint string, seconds int) (result *Result)

func (*Client) CrawlRecent

func (c *Client) CrawlRecent(endpoint string, seconds int) (result *Result)

func (*Client) Fail

func (c *Client) Fail(s string, v ...interface{})

func (*Client) LoadStatic

func (c *Client) LoadStatic(endpoint string, seconds int) (result *Result)

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Success

func (c *Client) Success(n float64)

type Result

type Result struct {
	Successes int
	Score     float64
	Reason    *[]string
	Fails     int
}

func (*Result) Fail

func (c *Result) Fail(s string, v ...interface{})

func (*Result) Success

func (c *Result) Success(n float64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL