profiler

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

QuotaScheduler Profiler

This package implements a simulation for testing the performance of the quotascheduler algorithm.

Usage:

Run ./scheduler_benchmark.sh to run simulation. Take note of its runtime. Consider taking a few samples, for repeatability.

Run ./visualize.sh to display a graphical view of which functions are taking up most of the run time.

Use these tools before and after making changes to the scheduler algorithm, to understand whether they have a significant performance implication. Sometimes, a seemingly simple code change can make a huge difference to performance; see e.g. https://chromium-review.googlesource.com/c/infra/infra/+/1696394

Documentation

Overview

Package profiler provides entity size and CPU usage profiling for quotascheduler entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSchedulerState

func NewSchedulerState(params StateParams) *scheduler.Scheduler

NewSchedulerState returns a proto-representation of a qscheduler state, with given size parameters.

func RunSimulation

func RunSimulation(params SimulationParams)

RunSimulation runs an iterated scheduler simulation.

Types

type SimulationParams

type SimulationParams struct {
	// StateParams describes the per-iteration parameters of workers and requests
	// to create.
	StateParams StateParams

	Iterations int
}

SimulationParams defines parameters for an iterated scheduler simulation.

type StateParams

type StateParams struct {
	// LabelCorpusSize is the number of unique labels referenced by tasks
	// or workers.
	LabelCorpusSize int

	// This many out of LabelCorpusSize labels will be considered provisionable
	// labels; every worker will have at least 1 of these, and every task will
	// will have 1 as a provisionable label. This is in addition to LabelsPerTask
	// or LabelsPerWorker.
	ProvisionableLabels int

	LabelsPerTask   int
	LabelsPerWorker int
	Workers         int
	Tasks           int

	Accounts           int
	ChargeRateMax      float32
	ChargeTime         float32
	Fanout             int
	PerLabelTaskLimits map[string]int32
	DisableFreeTasks   bool
}

StateParams defines size parameters used to construct a qscheduler state.

Jump to

Keyboard shortcuts

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