speedt

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts given string to the slice of bytes without allocations

Types

type Byte

type Byte float64
const (
	KB Byte = 1 << (10 * iota)
	MB
	GB
	TB
)

func (Byte) String

func (b Byte) String() string

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func NewCollection

func NewCollection(size Byte, cn *mongo.Client, namespace string) (*Collection, error)

func (*Collection) WriteTo

func (c *Collection) WriteTo(w io.Writer) (int64, error)

type Rand

type Rand struct {
	// contains filtered or unexported fields
}

func NewRand

func NewRand(size Byte) *Rand

func (*Rand) WriteTo

func (r *Rand) WriteTo(w io.Writer) (int64, error)

type Results

type Results struct {
	Size Byte
	Time time.Duration
}

func Run

func Run(nodeCN *mongo.Client, stg storage.Storage, compression pbm.CompressionType, sizeGb float64, collection string) (*Results, error)

func (Results) String

func (r Results) String() string

Jump to

Keyboard shortcuts

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