Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JobQueue = make(chan *models.Job, 100)
JobQueue is a simple in-memory job queue.
Functions ¶
func RegisterRoutes ¶
RegisterRoutes registers the API routes with the Gin router.
Types ¶
type JobHandler ¶
type JobHandler struct {
// contains filtered or unexported fields
}
JobHandler handles job-related API requests.
func NewJobHandler ¶
func NewJobHandler(store *JobStore) *JobHandler
NewJobHandler creates a new JobHandler.
func (*JobHandler) CreateJob ¶
func (h *JobHandler) CreateJob(c *gin.Context)
CreateJob creates a new benchmark job and adds it to the queue.
func (*JobHandler) GetJob ¶
func (h *JobHandler) GetJob(c *gin.Context)
GetJob retrieves a job by its ID.
type JobStore ¶
type JobStore struct {
// contains filtered or unexported fields
}
JobStore is an in-memory store for benchmark jobs.
type MetricsExporter ¶
type MetricsExporter struct{}
MetricsExporter is a service that exports benchmark metrics in Prometheus format.
func NewMetricsExporter ¶
func NewMetricsExporter() *MetricsExporter
NewMetricsExporter creates a new MetricsExporter.
func (*MetricsExporter) Handler ¶
func (e *MetricsExporter) Handler() gin.HandlerFunc
Handler returns a Gin handler that serves the metrics endpoint.
func (*MetricsExporter) RecordMetrics ¶
func (e *MetricsExporter) RecordMetrics(executor, target string, metrics *models.PerformanceMetrics)
RecordMetrics records the metrics from a benchmark run.
Click to show internal directories.
Click to hide internal directories.