Documentation
¶
Index ¶
- type ExportFormat
- type ExportResult
- type Format
- type JobOutputData
- type JobOutputExporter
- func (e *JobOutputExporter) BatchExport(jobs []*JobOutputData, format ExportFormat, basePath string) ([]*ExportResult, error)
- func (e *JobOutputExporter) BatchExportWithCallback(jobs []*JobOutputData, format ExportFormat, _ string, ...) ([]*ExportResult, error)
- func (e *JobOutputExporter) Export(data *JobOutputData, format ExportFormat, customPath string) (*ExportResult, error)
- func (e *JobOutputExporter) ExportJobOutput(jobID, jobName, outputType, content string) (string, error)
- func (e *JobOutputExporter) ExportSummary(results []*ExportResult) string
- func (e *JobOutputExporter) GetDefaultPath() string
- func (e *JobOutputExporter) GetSupportedFormats() []ExportFormat
- func (e *JobOutputExporter) SetDefaultPath(path string)
- func (e *JobOutputExporter) StreamingBatchExport(jobProvider func() (*JobOutputData, bool), format ExportFormat, _ string, ...) ([]*ExportResult, error)
- type PerformanceExporter
- func (pe *PerformanceExporter) BatchExportReports(profiler *performance.Profiler, optimizer *performance.Optimizer, ...) ([]*ExportResult, error)
- func (pe *PerformanceExporter) ExportComparison(_, _ *PerformanceReportData, _ ExportFormat, _ string) (*ExportResult, error)
- func (pe *PerformanceExporter) ExportPerformanceReport(profiler *performance.Profiler, optimizer *performance.Optimizer, ...) (*ExportResult, error)
- func (pe *PerformanceExporter) GetDefaultPath() string
- func (pe *PerformanceExporter) SetDefaultPath(path string)
- type PerformanceReportData
- type Result
- type SystemMetrics
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportFormat ¶
type ExportFormat = Format
type ExportResult ¶
type ExportResult = Result
type Format ¶ added in v0.3.0
type Format string
Format represents different output export formats
const ( // FormatText is the text export format. FormatText Format = "txt" // FormatJSON is the JSON export format. FormatJSON Format = "json" // FormatCSV is the CSV export format. FormatCSV Format = "csv" // FormatMarkdown is the Markdown export format. FormatMarkdown Format = "md" // FormatHTML is the HTML export format. FormatHTML Format = "html" )
type JobOutputData ¶
type JobOutputData struct {
JobID string `json:"job_id"`
JobName string `json:"job_name"`
OutputType string `json:"output_type"` // "stdout" or "stderr"
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
ExportedBy string `json:"exported_by"`
ExportTime time.Time `json:"export_time"`
ContentSize int `json:"content_size_bytes"`
}
JobOutputData represents the structure of job output data
type JobOutputExporter ¶
type JobOutputExporter struct {
// contains filtered or unexported fields
}
JobOutputExporter handles exporting job output to various formats
func NewJobOutputExporter ¶
func NewJobOutputExporter(defaultPath string) *JobOutputExporter
NewJobOutputExporter creates a new job output exporter
func (*JobOutputExporter) BatchExport ¶
func (e *JobOutputExporter) BatchExport(jobs []*JobOutputData, format ExportFormat, basePath string) ([]*ExportResult, error)
BatchExport exports multiple job outputs in the specified format
func (*JobOutputExporter) BatchExportWithCallback ¶
func (e *JobOutputExporter) BatchExportWithCallback(jobs []*JobOutputData, format ExportFormat, _ string, progressCallback func(current, total int, jobID string)) ([]*ExportResult, error)
BatchExportWithCallback exports multiple job outputs with optional progress callback
func (*JobOutputExporter) Export ¶
func (e *JobOutputExporter) Export(data *JobOutputData, format ExportFormat, customPath string) (*ExportResult, error)
Export exports job output to a file in the specified format
func (*JobOutputExporter) ExportJobOutput ¶
func (e *JobOutputExporter) ExportJobOutput(jobID, jobName, outputType, content string) (string, error)
ExportJobOutput exports job output to a file in the specified format
func (*JobOutputExporter) ExportSummary ¶
func (e *JobOutputExporter) ExportSummary(results []*ExportResult) string
ExportSummary creates a summary of exported files
func (*JobOutputExporter) GetDefaultPath ¶
func (e *JobOutputExporter) GetDefaultPath() string
GetDefaultPath returns the default export path
func (*JobOutputExporter) GetSupportedFormats ¶
func (e *JobOutputExporter) GetSupportedFormats() []ExportFormat
GetSupportedFormats returns all supported export formats
func (*JobOutputExporter) SetDefaultPath ¶
func (e *JobOutputExporter) SetDefaultPath(path string)
SetDefaultPath sets the default export path
func (*JobOutputExporter) StreamingBatchExport ¶
func (e *JobOutputExporter) StreamingBatchExport(jobProvider func() (*JobOutputData, bool), format ExportFormat, _ string, progressCallback func(current int, jobID string)) ([]*ExportResult, error)
StreamingBatchExport exports jobs one at a time to minimize memory usage
type PerformanceExporter ¶
type PerformanceExporter struct {
// contains filtered or unexported fields
}
PerformanceExporter handles exporting performance reports to various formats
func NewPerformanceExporter ¶
func NewPerformanceExporter(defaultPath string) *PerformanceExporter
NewPerformanceExporter creates a new performance exporter
func (*PerformanceExporter) BatchExportReports ¶
func (pe *PerformanceExporter) BatchExportReports(profiler *performance.Profiler, optimizer *performance.Optimizer, formats []ExportFormat) ([]*ExportResult, error)
BatchExportReports exports multiple performance reports in different formats
func (*PerformanceExporter) ExportComparison ¶
func (pe *PerformanceExporter) ExportComparison(_, _ *PerformanceReportData, _ ExportFormat, _ string) (*ExportResult, error)
ExportComparison exports a comparison between two performance snapshots
func (*PerformanceExporter) ExportPerformanceReport ¶
func (pe *PerformanceExporter) ExportPerformanceReport(profiler *performance.Profiler, optimizer *performance.Optimizer, format ExportFormat, customPath string) (*ExportResult, error)
ExportPerformanceReport exports a performance report in the specified format
func (*PerformanceExporter) GetDefaultPath ¶
func (pe *PerformanceExporter) GetDefaultPath() string
GetDefaultPath returns the default export path
func (*PerformanceExporter) SetDefaultPath ¶
func (pe *PerformanceExporter) SetDefaultPath(path string)
SetDefaultPath sets the default export path
type PerformanceReportData ¶
type PerformanceReportData struct {
GeneratedAt time.Time `json:"generated_at"`
ReportPeriod string `json:"report_period"`
SystemMetrics SystemMetrics `json:"system_metrics"`
OperationStats []performance.OperationSummary `json:"operation_stats"`
OptimizationTips []performance.Recommendation `json:"optimization_tips"`
}
PerformanceReportData represents performance metrics for export
type Result ¶ added in v0.3.0
type Result struct {
FilePath string
Format Format
Size int64
Success bool
Error error
Timestamp time.Time
}
Result contains information about the export operation
type SystemMetrics ¶
type SystemMetrics struct {
CPUUsage float64 `json:"cpu_usage"`
MemoryUsage float64 `json:"memory_usage"`
MemoryUsed uint64 `json:"memory_used"`
MemoryTotal uint64 `json:"memory_total"`
GoroutineCount int `json:"goroutine_count"`
ResponseTime time.Duration `json:"response_time"`
}
SystemMetrics represents system-level performance metrics
type TemplateData ¶ added in v0.3.0
type TemplateData struct {
*PerformanceReportData
MemoryUsedFormatted string
MemoryTotalFormatted string
Separator string
GeneratedAt string
}
TemplateData wraps PerformanceReportData with additional formatting