Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MillisecondBucket todo use timeout to calculate( if timeout smaller MillisecondBucket use it!) MillisecondBucket int = 5000 PopWaitSecond = 10 * time.Second EmptyPopSleepTime = 50 * time.Millisecond AggregationEmptyPopSleepTime = 500 * time.Millisecond ReportGoroutineNum = 3 KST = 3 )
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewIntegratorUsecase)
Functions ¶
This section is empty.
Types ¶
type IntegratorUsecase ¶
type IntegratorUsecase struct {
// contains filtered or unexported fields
}
func NewIntegratorUsecase ¶
func NewIntegratorUsecase(queRepository repo.QueRepository, reporterRepository ReporterRepository, recordRepository repo.RecordRepository) *IntegratorUsecase
func (*IntegratorUsecase) IntegrateReport ¶
func (s *IntegratorUsecase) IntegrateReport(ctx context.Context, b *Integrate) error
type LatencyDistribution ¶
type Report ¶
type Report struct { PlanId uint64 `json:"plan_id"` TaskId uint64 `json:"task_id"` Url string `json:"url"` Timestamp int64 `json:"timestamp"` TotalNum int64 `json:"total_num"` TotalResponseContentLength int64 `json:"total_response_content_length"` DurationMap map[int32]int64 `json:"duration_map"` StatusMap map[int32]int64 `json:"status_map"` ErrorMap map[string]int64 `json:"error_map"` BodyCheckResultMap map[string]int64 `json:"body_check_result_map"` LatencyMap map[string]int32 `json:"latency_map"` }
type ReporterRepository ¶
type Summary ¶
type Summary struct { TaskId uint64 Rps float64 AvgTotal int64 Fastest int64 Slowest int64 Average float64 ErrorCount int64 SizeTotal int64 NumRes int64 TotalCostTime float64 TimeBuckets []int64 `json:"-"` StatusCodeDist map[int]int64 Histogram []Bucket LatencyDistribution []LatencyDistribution ErrorDist map[string]int64 BodyCheckResultMap map[string]int64 }
Click to show internal directories.
Click to hide internal directories.