load

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToHTMLEntities added in v0.2.4

func ConvertToHTMLEntities(jsonStr string) string

Types

type CreateLoadTestScenarioCatalogReq added in v0.3.4

type CreateLoadTestScenarioCatalogReq struct {
	Name         string `json:"name" binding:"required" example:"Basic Load Test Scenario"`
	Description  string `json:"description" example:"Basic load test scenario catalog template"`
	VirtualUsers string `json:"virtualUsers" binding:"required" example:"10"`
	Duration     string `json:"duration" binding:"required" example:"300"`
	RampUpTime   string `json:"rampUpTime" binding:"required" example:"60"`
	RampUpSteps  string `json:"rampUpSteps" binding:"required" example:"5"`
}

LoadTestScenarioCatalog DTOs

type GetAllLoadGeneratorInstallInfoParam

type GetAllLoadGeneratorInstallInfoParam struct {
	Page   int    `json:"page"`
	Size   int    `json:"size"`
	Status string `json:"Status"`
}

type GetAllLoadGeneratorInstallInfoResult

type GetAllLoadGeneratorInstallInfoResult struct {
	LoadGeneratorInstallInfoResults []LoadGeneratorInstallInfoResult `json:"loadGeneratorInstallInfoResults,omitempty"`
	TotalRows                       int64                            `json:"totalRows,omitempty"`
}

type GetAllLoadTestExecutionInfosParam

type GetAllLoadTestExecutionInfosParam struct {
	Page int `json:"page"`
	Size int `json:"size"`
}

type GetAllLoadTestExecutionInfosResult

type GetAllLoadTestExecutionInfosResult struct {
	TotalRow               int64                         `json:"totalRow,omitempty"`
	LoadTestExecutionInfos []LoadTestExecutionInfoResult `json:"loadTestExecutionInfos,omitempty"`
}

type GetAllLoadTestExecutionStateParam

type GetAllLoadTestExecutionStateParam struct {
	Page            int                      `json:"page"`
	Size            int                      `json:"size"`
	LoadTestKey     string                   `json:"loadTestKey"`
	ExecutionStatus constant.ExecutionStatus `json:"executionStatus"`
}

type GetAllLoadTestExecutionStateResult

type GetAllLoadTestExecutionStateResult struct {
	LoadTestExecutionStates []LoadTestExecutionStateResult `json:"loadTestExecutionStates,omitempty"`
	TotalRow                int64                          `json:"totalRow,omitempty"`
}

type GetAllLoadTestScenarioCatalogsParam added in v0.3.4

type GetAllLoadTestScenarioCatalogsParam struct {
	Page int    `json:"page" example:"1"`
	Size int    `json:"size" example:"10"`
	Name string `json:"name,omitempty" example:"Basic"`
}

type GetAllLoadTestScenarioCatalogsResult added in v0.3.4

type GetAllLoadTestScenarioCatalogsResult struct {
	LoadTestScenarioCatalogs []LoadTestScenarioCatalogResult `json:"loadTestScenarioCatalogs"`
	TotalRow                 int64                           `json:"totalRow"`
}

type GetAllMonitoringAgentInfoResult

type GetAllMonitoringAgentInfoResult struct {
	MonitoringAgentInfos []MonitoringAgentInstallationResult `json:"monitoringAgentInfos,omitempty"`
	TotalRow             int64                               `json:"totalRow,omitempty"`
}

type GetAllMonitoringAgentInfosParam

type GetAllMonitoringAgentInfosParam struct {
	Page  int    `json:"page"`
	Size  int    `json:"size"`
	NsId  string `json:"nsId,omitempty"`
	MciId string `json:"mciId,omitempty"`
	VmId  string `json:"vmId,omitempty"`
}

type GetLastLoadTestResultParam added in v0.2.6

type GetLastLoadTestResultParam struct {
	NsId   string
	MciId  string
	VmId   string
	Format constant.ResultFormat
}

type GetLoadTestExecutionInfoParam

type GetLoadTestExecutionInfoParam struct {
	LoadTestKey string `json:"loadTestKey"`
}

type GetLoadTestExecutionStateParam

type GetLoadTestExecutionStateParam struct {
	LoadTestKey string `json:"loadTestKey"`
	NsId        string `json:"nsId"`
	MciId       string `json:"mciId"`
	VmId        string `json:"vmId"`
}

type GetLoadTestResultParam

type GetLoadTestResultParam struct {
	LoadTestKey string
	Format      constant.ResultFormat
}

type InstallLoadGeneratorParam

type InstallLoadGeneratorParam struct {
	InstallLocation constant.InstallLocation `json:"installLocation,omitempty"`
	Coordinates     []string                 `json:"coordinate"`
	// VM 정보 추가 (CSP 매칭용)
	NsId  string `json:"nsId,omitempty"`
	MciId string `json:"mciId,omitempty"`
	VmId  string `json:"vmId,omitempty"`
}

type LoadGeneratorInstallInfo

type LoadGeneratorInstallInfo struct {
	gorm.Model
	InstallLocation constant.InstallLocation
	InstallType     string
	InstallPath     string
	InstallVersion  string
	Status          string

	IsCluster   bool
	MasterId    uint
	ClusterSize uint64

	PublicKeyName        string
	PrivateKeyName       string
	LoadGeneratorServers []LoadGeneratorServer `gorm:"foreignKey:LoadGeneratorInstallInfoId;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type LoadGeneratorInstallInfoResult

type LoadGeneratorInstallInfoResult struct {
	ID              uint                     `json:"id,omitempty"`
	InstallLocation constant.InstallLocation `json:"installLocation,omitempty"`
	InstallType     string                   `json:"installType,omitempty"`
	InstallPath     string                   `json:"installPath,omitempty"`
	InstallVersion  string                   `json:"installVersion,omitempty"`
	Status          string                   `json:"status,omitempty"`
	CreatedAt       time.Time                `json:"createdAt,omitempty"`
	UpdatedAt       time.Time                `json:"updatedAt,omitempty"`

	PublicKeyName        string                      `json:"publicKeyName,omitempty"`
	PrivateKeyName       string                      `json:"privateKeyName,omitempty"`
	LoadGeneratorServers []LoadGeneratorServerResult `json:"loadGeneratorServers,omitempty"`
}

type LoadGeneratorServer

type LoadGeneratorServer struct {
	gorm.Model
	VmUid           string
	VmName          string
	ImageName       string
	Csp             string
	Region          string
	Zone            string
	PublicIp        string
	PrivateIp       string
	PublicDns       string
	MachineType     string
	Status          string
	SshPort         string
	Lat             string
	Lon             string
	Username        string
	VmId            string
	StartTime       string
	AdditionalVmKey string
	Label           string

	IsCluster   bool
	IsMaster    bool
	ClusterSize uint64

	LoadGeneratorInstallInfoId uint
	LoadGeneratorInstallInfo   LoadGeneratorInstallInfo
}

type LoadGeneratorServerResult

type LoadGeneratorServerResult struct {
	ID              uint      `json:"id,omitempty"`
	Csp             string    `json:"csp,omitempty"`
	Region          string    `json:"region,omitempty"`
	Zone            string    `json:"zone,omitempty"`
	PublicIp        string    `json:"publicIp,omitempty"`
	PrivateIp       string    `json:"privateIp,omitempty"`
	PublicDns       string    `json:"publicDns,omitempty"`
	MachineType     string    `json:"machineType,omitempty"`
	Status          string    `json:"status,omitempty"`
	SshPort         string    `json:"sshPort,omitempty"`
	Lat             string    `json:"lat,omitempty"`
	Lon             string    `json:"lon,omitempty"`
	Username        string    `json:"username,omitempty"`
	VmId            string    `json:"vmId,omitempty"`
	StartTime       string    `json:"startTime,omitempty"`
	AdditionalVmKey string    `json:"additionalVmKey,omitempty"`
	Label           string    `json:"label,omitempty"`
	CreatedAt       time.Time `json:"createdAt,omitempty"`
	UpdatedAt       time.Time `json:"updatedAt,omitempty"`
}

type LoadRepository

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

func NewLoadRepository

func NewLoadRepository(db *gorm.DB) *LoadRepository

func (*LoadRepository) DeleteAgentInstallInfoStatusTx

func (r *LoadRepository) DeleteAgentInstallInfoStatusTx(ctx context.Context, param *MonitoringAgentInfo) error

func (*LoadRepository) DeleteLoadGeneratorServerTx added in v0.2.3

func (r *LoadRepository) DeleteLoadGeneratorServerTx(ctx context.Context, deleteIds []uint) error

func (*LoadRepository) GetAllMonitoringAgentInfosTx

func (r *LoadRepository) GetAllMonitoringAgentInfosTx(ctx context.Context, param MonitoringAgentInstallationParams) ([]MonitoringAgentInfo, error)

func (*LoadRepository) GetLoadTestExecutionInfoTx

func (r *LoadRepository) GetLoadTestExecutionInfoTx(ctx context.Context, param GetLoadTestExecutionInfoParam) (LoadTestExecutionInfo, error)

func (*LoadRepository) GetLoadTestExecutionStateTx

func (r *LoadRepository) GetLoadTestExecutionStateTx(ctx context.Context, param GetLoadTestExecutionStateParam) (LoadTestExecutionState, error)

func (*LoadRepository) GetOrInsertLoadGeneratorInstallInfoTx added in v0.2.3

func (r *LoadRepository) GetOrInsertLoadGeneratorInstallInfoTx(ctx context.Context, param *LoadGeneratorInstallInfo) error

func (*LoadRepository) GetPagingLoadGeneratorInstallInfosTx

func (r *LoadRepository) GetPagingLoadGeneratorInstallInfosTx(ctx context.Context, param GetAllLoadGeneratorInstallInfoParam) ([]LoadGeneratorInstallInfo, int64, error)

func (*LoadRepository) GetPagingLoadTestExecutionHistoryTx

func (r *LoadRepository) GetPagingLoadTestExecutionHistoryTx(ctx context.Context, param GetAllLoadTestExecutionInfosParam) ([]LoadTestExecutionInfo, int64, error)

func (*LoadRepository) GetPagingLoadTestExecutionStateTx

func (r *LoadRepository) GetPagingLoadTestExecutionStateTx(ctx context.Context, param GetAllLoadTestExecutionStateParam) ([]LoadTestExecutionState, int64, error)

func (*LoadRepository) GetPagingMonitoringAgentInfosTx

func (r *LoadRepository) GetPagingMonitoringAgentInfosTx(ctx context.Context, param GetAllMonitoringAgentInfosParam) ([]MonitoringAgentInfo, int64, error)

func (*LoadRepository) GetValidLoadGeneratorInstallInfoByIdTx

func (r *LoadRepository) GetValidLoadGeneratorInstallInfoByIdTx(ctx context.Context, loadGeneratorInstallInfoId uint) (LoadGeneratorInstallInfo, error)

func (*LoadRepository) InsertLoadTestExecutionStateTx

func (r *LoadRepository) InsertLoadTestExecutionStateTx(ctx context.Context, param *LoadTestExecutionState) error

func (*LoadRepository) InsertMonitoringAgentInfoTx

func (r *LoadRepository) InsertMonitoringAgentInfoTx(ctx context.Context, param *MonitoringAgentInfo) error

func (*LoadRepository) SaveForLoadTestExecutionTx

func (r *LoadRepository) SaveForLoadTestExecutionTx(ctx context.Context, loadParam *LoadTestExecutionInfo) error

func (*LoadRepository) UpdateAgentInstallInfoStatusTx

func (r *LoadRepository) UpdateAgentInstallInfoStatusTx(ctx context.Context, param *MonitoringAgentInfo) error

func (*LoadRepository) UpdateLoadGeneratorInstallInfoTx

func (r *LoadRepository) UpdateLoadGeneratorInstallInfoTx(ctx context.Context, param *LoadGeneratorInstallInfo) error

func (*LoadRepository) UpdateLoadTestExecutionInfoDuration

func (r *LoadRepository) UpdateLoadTestExecutionInfoDuration(ctx context.Context, loadTestKey, compileDuration, executionDuration string) error

func (*LoadRepository) UpdateLoadTestExecutionStateTx

func (r *LoadRepository) UpdateLoadTestExecutionStateTx(ctx context.Context, param *LoadTestExecutionState) error

type LoadService

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

LoadService represents a service for managing load operations.

func NewLoadService

func NewLoadService(loadRepo *LoadRepository, client *tumblebug.TumblebugClient, db *gorm.DB) *LoadService

NewLoadService creates a new instance of LoadService.

func (*LoadService) CreateLoadTestScenarioCatalog added in v0.3.4

func (l *LoadService) CreateLoadTestScenarioCatalog(ctx context.Context, catalog LoadTestScenarioCatalog) (LoadTestScenarioCatalogResult, error)

CreateLoadTestScenarioCatalog creates a new load test scenario catalog.

func (*LoadService) DeleteLoadTestScenarioCatalog added in v0.3.4

func (l *LoadService) DeleteLoadTestScenarioCatalog(ctx context.Context, id uint) error

DeleteLoadTestScenarioCatalog soft deletes a load test scenario catalog.

func (*LoadService) GetAllLoadTestExecutionInfos

func (*LoadService) GetAllLoadTestExecutionState

func (*LoadService) GetAllLoadTestScenarioCatalogs added in v0.3.4

GetAllLoadTestScenarioCatalogs retrieves all load test scenario catalogs with pagination.

func (*LoadService) GetAllMonitoringAgentInfos

func (l *LoadService) GetAllMonitoringAgentInfos(param GetAllMonitoringAgentInfosParam) (GetAllMonitoringAgentInfoResult, error)

func (*LoadService) GetLastLoadTestMetrics added in v0.2.6

func (l *LoadService) GetLastLoadTestMetrics(param GetLastLoadTestResultParam) ([]MetricsSummary, error)

func (*LoadService) GetLastLoadTestResult added in v0.2.6

func (l *LoadService) GetLastLoadTestResult(param GetLastLoadTestResultParam) (interface{}, error)

func (*LoadService) GetLoadTestExecutionInfo

func (l *LoadService) GetLoadTestExecutionInfo(param GetLoadTestExecutionInfoParam) (LoadTestExecutionInfoResult, error)

func (*LoadService) GetLoadTestExecutionState

func (l *LoadService) GetLoadTestExecutionState(param GetLoadTestExecutionStateParam) (LoadTestExecutionStateResult, error)

func (*LoadService) GetLoadTestMetrics

func (l *LoadService) GetLoadTestMetrics(param GetLoadTestResultParam) ([]MetricsSummary, error)

func (*LoadService) GetLoadTestResult

func (l *LoadService) GetLoadTestResult(param GetLoadTestResultParam) (interface{}, error)

func (*LoadService) GetLoadTestScenarioCatalog added in v0.3.4

func (l *LoadService) GetLoadTestScenarioCatalog(ctx context.Context, id uint) (LoadTestScenarioCatalogResult, error)

GetLoadTestScenarioCatalog retrieves a specific load test scenario catalog by ID.

func (*LoadService) InstallLoadGenerator

InstallLoadGenerator installs the load generator either locally or remotely. Currently remote request is executing via cb-tumblebug.

func (*LoadService) InstallMonitoringAgent

InstallMonitoringAgent installs a monitoring agent on specified VMs or all VM on mci.

func (*LoadService) Readyz added in v0.2.3

func (l *LoadService) Readyz() error

func (*LoadService) RunLoadTest

func (l *LoadService) RunLoadTest(param RunLoadTestParam) (string, error)

RunLoadTest initiates the load test and performs necessary initializations. Generates a load test key, installs the load generator or retrieves existing installation information, saves the load test execution state, and then asynchronously runs the load test.

func (*LoadService) StopLoadTest

func (l *LoadService) StopLoadTest(param StopLoadTestParam) error

func (*LoadService) UninstallLoadGenerator

func (l *LoadService) UninstallLoadGenerator(param UninstallLoadGeneratorParam) error

func (*LoadService) UninstallMonitoringAgent

func (l *LoadService) UninstallMonitoringAgent(param MonitoringAgentInstallationParams) (int64, error)

UninstallMonitoringAgent uninstalls a monitoring agent on specified VMs or all VM on Mci. It takes MonitoringAgentInstallationParams as input and returns the number of affected results and any encountered error.

func (*LoadService) UpdateLoadTestScenarioCatalog added in v0.3.4

func (l *LoadService) UpdateLoadTestScenarioCatalog(ctx context.Context, id uint, catalog LoadTestScenarioCatalog) (LoadTestScenarioCatalogResult, error)

UpdateLoadTestScenarioCatalog updates an existing load test scenario catalog.

type LoadTestExecutionHttpInfo

type LoadTestExecutionHttpInfo struct {
	gorm.Model
	Method   string
	Protocol string
	Hostname string
	Port     string
	Path     string
	BodyData string

	LoadTestExecutionInfoId uint
}

type LoadTestExecutionHttpInfoResult

type LoadTestExecutionHttpInfoResult struct {
	ID       uint   `json:"id"`
	Method   string `json:"method,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Hostname string `json:"hostname,omitempty"`
	Port     string `json:"port,omitempty"`
	Path     string `json:"path,omitempty"`
	BodyData string `json:"bodyData,omitempty"`
}

type LoadTestExecutionInfo

type LoadTestExecutionInfo struct {
	gorm.Model
	LoadTestKey  string `gorm:"index:idx_info_load_test_key,unique"`
	TestName     string `gorm:"index:idx_info_load_test_name"`
	VirtualUsers string
	Duration     string
	RampUpTime   string
	RampUpSteps  string

	NsId  string
	MciId string
	VmId  string

	AgentHostname  string
	AgentInstalled bool

	CompileDuration            string
	ExecutionDuration          string
	LoadTestExecutionHttpInfos []LoadTestExecutionHttpInfo

	// LoadTestExecutionInfo has one LoadTestExecutionState
	LoadTestExecutionStateId uint
	LoadTestExecutionState   LoadTestExecutionState

	// LoadTestExecutionInfo has one LoadGeneratorInstallInfo
	LoadGeneratorInstallInfoId uint
	LoadGeneratorInstallInfo   LoadGeneratorInstallInfo
}

type LoadTestExecutionInfoResult

type LoadTestExecutionInfoResult struct {
	ID                         uint                              `json:"id"`
	LoadTestKey                string                            `json:"loadTestKey,omitempty"`
	TestName                   string                            `json:"testName,omitempty"`
	VirtualUsers               string                            `json:"virtualUsers,omitempty"`
	Duration                   string                            `json:"duration,omitempty"`
	RampUpTime                 string                            `json:"rampUpTime,omitempty"`
	RampUpSteps                string                            `json:"rampUpSteps,omitempty"`
	AgentHostname              string                            `json:"agentHostname,omitempty"`
	AgentInstalled             bool                              `json:"agentInstalled,omitempty"`
	CompileDuration            string                            `json:"compileDuration,omitempty"`
	ExecutionDuration          string                            `json:"executionDuration,omitempty"`
	LoadTestExecutionHttpInfos []LoadTestExecutionHttpInfoResult `json:"loadTestExecutionHttpInfos,omitempty"`
	LoadTestExecutionState     LoadTestExecutionStateResult      `json:"loadTestExecutionState,omitempty"`
	LoadGeneratorInstallInfo   LoadGeneratorInstallInfoResult    `json:"loadGeneratorInstallInfo,omitempty"`
}

type LoadTestExecutionState

type LoadTestExecutionState struct {
	gorm.Model
	LoadTestKey string `gorm:"index:idx_state_load_test_key,unique"`

	NsId  string
	MciId string
	VmId  string

	ExecutionStatus             constant.ExecutionStatus
	StartAt                     time.Time
	FinishAt                    *time.Time
	ExpectedFinishAt            time.Time
	TotalExpectedExcutionSecond uint64
	FailureMessage              string
	CompileDuration             string
	ExecutionDuration           string
	WithMetrics                 bool

	// not to make one to one relationship between LoadTestExecutionInfo and LoadGeneratorInstallInfo
	TestExecutionInfoId    uint
	GeneratorInstallInfoId uint
}

type LoadTestExecutionStateResult

type LoadTestExecutionStateResult struct {
	ID                          uint                           `json:"id"`
	LoadGeneratorInstallInfoId  uint                           `json:"loadGeneratorInstallInfoId,omitempty"`
	LoadGeneratorInstallInfo    LoadGeneratorInstallInfoResult `json:"loadGeneratorInstallInfo,omitempty"`
	LoadTestKey                 string                         `json:"loadTestKey,omitempty"`
	ExecutionStatus             constant.ExecutionStatus       `json:"executionStatus,omitempty"`
	StartAt                     time.Time                      `json:"startAt,omitempty"`
	FinishAt                    *time.Time                     `json:"finishAt,omitempty"`
	ExpectedFinishAt            time.Time                      `json:"expectedFinishAt,omitempty"`
	IconCode                    constant.IconCode              `json:"iconCode"`
	TotalExpectedExcutionSecond uint64                         `json:"totalExpectedExecutionSecond,omitempty"`
	FailureMessage              string                         `json:"failureMessage,omitempty"`
	CompileDuration             string                         `json:"compileDuration,omitempty"`
	ExecutionDuration           string                         `json:"executionDuration,omitempty"`
	CreatedAt                   time.Time                      `json:"createdAt,omitempty"`
	UpdatedAt                   time.Time                      `json:"updatedAt,omitempty"`
}

type LoadTestScenarioCatalog added in v0.3.4

type LoadTestScenarioCatalog struct {
	gorm.Model
	Name         string `gorm:"not null;index:idx_scenario_catalog_name"`
	Description  string
	VirtualUsers string `gorm:"not null"`
	Duration     string `gorm:"not null"`
	RampUpTime   string `gorm:"not null"`
	RampUpSteps  string `gorm:"not null"`
}

type LoadTestScenarioCatalogResult added in v0.3.4

type LoadTestScenarioCatalogResult struct {
	ID           uint      `json:"id"`
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	VirtualUsers string    `json:"virtualUsers"`
	Duration     string    `json:"duration"`
	RampUpTime   string    `json:"rampUpTime"`
	RampUpSteps  string    `json:"rampUpSteps"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
}

type LoadTestStatistics

type LoadTestStatistics struct {
	Label         string  `json:"label"`
	RequestCount  int     `json:"requestCount"`
	Average       float64 `json:"average"`
	Median        float64 `json:"median"`
	NinetyPercent float64 `json:"ninetyPercent"`
	NinetyFive    float64 `json:"ninetyFive"`
	NinetyNine    float64 `json:"ninetyNine"`
	MinTime       float64 `json:"minTime"`
	MaxTime       float64 `json:"maxTime"`
	ErrorPercent  float64 `json:"errorPercent"`
	Throughput    float64 `json:"throughput"`
	ReceivedKB    float64 `json:"receivedKB"`
	SentKB        float64 `json:"sentKB"`
}

type MetricsRawData

type MetricsRawData struct {
	Value     string
	Unit      string
	IsError   bool
	Timestamp time.Time
}

type MetricsSummary

type MetricsSummary struct {
	Label   string
	Metrics []*MetricsRawData
}

type MonitoringAgentInfo

type MonitoringAgentInfo struct {
	gorm.Model

	Username  string
	Status    string
	AgentType string

	NsId    string
	MciId   string
	VmId    string
	VmCount int
}

type MonitoringAgentInstallationParams

type MonitoringAgentInstallationParams struct {
	NsId  string   `json:"nsId"`
	MciId string   `json:"mciId"`
	VmIds []string `json:"vmIds,omitempty"`
}

MonitoringAgentInstallationParams represents parameters for installing a monitoring agent.

type MonitoringAgentInstallationResult

type MonitoringAgentInstallationResult struct {
	ID        uint      `json:"id,omitempty"`
	NsId      string    `json:"nsId,omitempty"`
	MciId     string    `json:"mciId,omitempty"`
	VmId      string    `json:"vmId,omitempty"`
	VmCount   int       `json:"vmCount,omitempty"`
	Status    string    `json:"status,omitempty"`
	Username  string    `json:"username,omitempty"`
	AgentType string    `json:"agentType,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

MonitoringAgentInstallationResult represents the result of a monitoring agent installation.

type ResultRawData

type ResultRawData struct {
	No         int
	Elapsed    int // time to last byte
	Bytes      int
	SentBytes  int
	URL        string
	Latency    int // time to first byte
	IdleTime   int // time not spent sampling in jmeter (milliseconds) (generally 0)
	Connection int // time to establish connection
	IsError    bool
	Timestamp  time.Time
}

func SampleDataByTimeInterval added in v0.2.7

func SampleDataByTimeInterval(data []*ResultRawData, intervalMs int) []*ResultRawData

type ResultSummary

type ResultSummary struct {
	Label   string
	Results []*ResultRawData
}

type RunLoadTestHttpParam

type RunLoadTestHttpParam struct {
	Method   string `json:"method"`
	Protocol string `json:"protocol"`
	Hostname string `json:"hostname"`
	Port     string `json:"port"`
	Path     string `json:"path,omitempty"`
	BodyData string `json:"bodyData,omitempty"`
}

type RunLoadTestParam

type RunLoadTestParam struct {
	LoadTestKey                string                    `json:"loadTestKey"`
	InstallLoadGenerator       InstallLoadGeneratorParam `json:"installLoadGenerator"`
	LoadGeneratorInstallInfoId uint                      `json:"loadGeneratorInstallInfoId"`

	// test scenario
	TestName     string `json:"testName"`
	VirtualUsers string `json:"virtualUsers"`
	Duration     string `json:"duration"`
	RampUpTime   string `json:"rampUpTime"`
	RampUpSteps  string `json:"rampUpSteps"`

	// related tumblebug
	NsId  string `json:"nsId"`
	MciId string `json:"mciId"`
	VmId  string `json:"vmId"`

	CollectAdditionalSystemMetrics bool
	AgentHostname                  string

	HttpReqs []RunLoadTestHttpParam `json:"httpReqs,omitempty"`
}

type StopLoadTestParam

type StopLoadTestParam struct {
	LoadTestKey string `json:"loadTestKey"`
	NsId        string `json:"nsId"`
	MciId       string `json:"mciId"`
	VmId        string `json:"vmId"`
}

type UninstallLoadGeneratorParam

type UninstallLoadGeneratorParam struct {
	LoadGeneratorInstallInfoId uint
}

type UpdateLoadTestScenarioCatalogReq added in v0.3.4

type UpdateLoadTestScenarioCatalogReq struct {
	Name         string `json:"name" example:"Updated Load Test Scenario"`
	Description  string `json:"description" example:"Updated load test scenario catalog template"`
	VirtualUsers string `json:"virtualUsers" example:"20"`
	Duration     string `json:"duration" example:"600"`
	RampUpTime   string `json:"rampUpTime" example:"120"`
	RampUpSteps  string `json:"rampUpSteps" example:"10"`
}

Jump to

Keyboard shortcuts

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