Versions in this module Expand all Collapse all v1 v1.1.0 Sep 2, 2025 v1.0.0 Aug 11, 2025 Changes in this version + type BenchmarkComparison struct + AllocRatio float64 + MemoryRatio float64 + Name1 string + Name2 string + Result1Faster bool + Result1MemEfficient bool + SpeedRatio float64 + func (bc BenchmarkComparison) String() string + type BenchmarkFunc func() error + type BenchmarkReport struct + GeneratedAt time.Time + Results []BenchmarkResult + Summary BenchmarkSummary + SystemInfo SystemInfo + type BenchmarkResult struct + AllocsPerOp int64 + AvgDuration time.Duration + BytesPerOp int64 + Error string + Iterations int + MaxDuration time.Duration + MemoryUsed int64 + MinDuration time.Duration + Name string + Success bool + Timestamp time.Time + TotalDuration time.Duration + type BenchmarkRunner struct + func NewBenchmarkRunner() *BenchmarkRunner + func (br *BenchmarkRunner) Benchmark(name string, fn BenchmarkFunc) BenchmarkResult + func (br *BenchmarkRunner) Clear() + func (br *BenchmarkRunner) Compare(name1, name2 string) (BenchmarkComparison, error) + func (br *BenchmarkRunner) ExportReport(filename string) error + func (br *BenchmarkRunner) GenerateReport() BenchmarkReport + func (br *BenchmarkRunner) GetResult(name string) (BenchmarkResult, bool) + func (br *BenchmarkRunner) GetResults() []BenchmarkResult + func (br *BenchmarkRunner) PrintResults() + func (br *BenchmarkRunner) SetMaxIterations(n int) + func (br *BenchmarkRunner) SetMinIterations(n int) + func (br *BenchmarkRunner) SetMinTime(d time.Duration) + func (br *BenchmarkRunner) SetWarmupIterations(n int) + type BenchmarkSummary struct + AvgDuration time.Duration + FailedRuns int + FastestBench string + SlowestBench string + SuccessfulRuns int + TotalBenchmarks int + TotalDuration time.Duration + type MemoryFS struct + func NewMemoryFS() *MemoryFS + func (mfs *MemoryFS) Open(name string) (fs.File, error) + func (mfs *MemoryFS) ReadDir(name string) ([]fs.DirEntry, error) + func (mfs *MemoryFS) WalkDir(root string, fn fs.WalkDirFunc) error + func (mfs *MemoryFS) WriteFile(name string, data []byte) + type MemoryFile struct + func (f *MemoryFile) IsDir() bool + func (f *MemoryFile) ModTime() time.Time + func (f *MemoryFile) Mode() fs.FileMode + func (f *MemoryFile) Name() string + func (f *MemoryFile) Size() int64 + func (f *MemoryFile) Sys() any + type MemoryProfile struct + AllocsDelta uint64 + EndAllocs uint64 + EndHeapAlloc uint64 + EndSys uint64 + HeapAllocDelta int64 + StartAllocs uint64 + StartHeapAlloc uint64 + StartSys uint64 + SysDelta int64 + type MockDir struct + Entries []fs.DirEntry + ModTime time.Time + Mode fs.FileMode + Name string + type MockDirEntry struct + func (mde MockDirEntry) Info() (fs.FileInfo, error) + func (mde MockDirEntry) IsDir() bool + func (mde MockDirEntry) Name() string + func (mde MockDirEntry) Type() fs.FileMode + type MockDirHandle struct + func (mdh *MockDirHandle) Close() error + func (mdh *MockDirHandle) Read([]byte) (int, error) + func (mdh *MockDirHandle) Stat() (fs.FileInfo, error) + type MockFS struct + func NewMockFS() *MockFS + func (mfs *MockFS) AddDir(path string) + func (mfs *MockFS) AddFile(path string, content string) + func (mfs *MockFS) AddFileWithMode(path string, content string, mode fs.FileMode) + func (mfs *MockFS) Open(name string) (fs.File, error) + func (mfs *MockFS) ReadDir(name string) ([]fs.DirEntry, error) + func (mfs *MockFS) ReadFile(name string) ([]byte, error) + func (mfs *MockFS) RemoveDir(path string) + func (mfs *MockFS) RemoveFile(path string) + func (mfs *MockFS) Stat(name string) (fs.FileInfo, error) + func (mfs *MockFS) WalkDir(root string, fn fs.WalkDirFunc) error + type MockFile struct + Content []byte + ModTime time.Time + Mode fs.FileMode + Name string + type MockFileHandle struct + func (mfh *MockFileHandle) Close() error + func (mfh *MockFileHandle) Read(b []byte) (int, error) + func (mfh *MockFileHandle) Stat() (fs.FileInfo, error) + type MockFileInfo struct + func (mfi MockFileInfo) IsDir() bool + func (mfi MockFileInfo) ModTime() time.Time + func (mfi MockFileInfo) Mode() fs.FileMode + func (mfi MockFileInfo) Name() string + func (mfi MockFileInfo) Size() int64 + func (mfi MockFileInfo) Sys() any + type MockLogEntry struct + Args []any + Level string + Message string + Time time.Time + type MockLogger struct + func NewMockLogger() *MockLogger + func (ml *MockLogger) Clear() + func (ml *MockLogger) CountByLevel(level string) int + func (ml *MockLogger) Debug(msg string, args ...any) + func (ml *MockLogger) Error(msg string, args ...any) + func (ml *MockLogger) GetLogs() []MockLogEntry + func (ml *MockLogger) GetLogsByLevel(level string) []MockLogEntry + func (ml *MockLogger) HasMessage(message string) bool + func (ml *MockLogger) Info(msg string, args ...any) + func (ml *MockLogger) Warn(msg string, args ...any) + type MockRenderCall struct + Data any + Error string + Result string + TemplatePath string + Timestamp time.Time + type MockRenderer struct + func NewMockRenderer() *MockRenderer + func (mr *MockRenderer) Clear() + func (mr *MockRenderer) GetCallCount() int + func (mr *MockRenderer) GetCalls() []MockRenderCall + func (mr *MockRenderer) GetCallsForTemplate(templatePath string) []MockRenderCall + func (mr *MockRenderer) Render(templatePath string, data any) (string, error) + func (mr *MockRenderer) SetRenderFunc(fn func(templatePath string, data any) (string, error)) + func (mr *MockRenderer) WasCalled(templatePath string) bool + type OperationProfile struct + AvgTime time.Duration + Count int + MaxTime time.Duration + MinTime time.Duration + Name string + TotalTime time.Duration + type PerformanceProfile struct + Duration time.Duration + EndTime time.Time + MemoryProfile MemoryProfile + Name string + Operations []OperationProfile + StartTime time.Time + SystemResources SystemResourcesProfile + type PerformanceProfiler struct + func NewPerformanceProfiler() *PerformanceProfiler + func (pp *PerformanceProfiler) Clear() + func (pp *PerformanceProfiler) EndProfile(name string) + func (pp *PerformanceProfiler) GetAllProfiles() map[string]PerformanceProfile + func (pp *PerformanceProfiler) GetProfile(name string) (PerformanceProfile, bool) + func (pp *PerformanceProfiler) StartProfile(name string) + type SnapshotManager struct + func NewSnapshotManager(snapshotDir string, updateMode bool) *SnapshotManager + func (sm *SnapshotManager) AssertSnapshot(testName, actual string) error + func (sm *SnapshotManager) CleanOrphanSnapshots(activeTests []string) error + func (sm *SnapshotManager) Clear() + func (sm *SnapshotManager) GetResults() map[string]SnapshotResult + func (sm *SnapshotManager) GetSummary() SnapshotSummary + func (sm *SnapshotManager) SetUpdateMode(update bool) + type SnapshotReporter struct + func NewSnapshotReporter() *SnapshotReporter + func (sr *SnapshotReporter) AddResult(result SnapshotResult) + func (sr *SnapshotReporter) ExportJSON(filename string) error + func (sr *SnapshotReporter) GenerateReport() string + type SnapshotResult struct + Actual string + Expected string + FilePath string + Hash string + Passed bool + TestName string + Timestamp time.Time + UpdatedCount int + type SnapshotSummary struct + FailedTests int + PassedTests int + TotalTests int + UpdateMode bool + UpdatedTests int + func (ss SnapshotSummary) String() string + type SnapshotTestCase struct + Data map[string]any + Expected string + Name string + Template string + type SnapshotTestSuite struct + func NewSnapshotTestSuite(snapshotDir string, updateMode bool) *SnapshotTestSuite + func (sts *SnapshotTestSuite) AddTestCase(name, template string, data map[string]any) + func (sts *SnapshotTestSuite) GetManager() *SnapshotManager + func (sts *SnapshotTestSuite) GetTestCases() []SnapshotTestCase + func (sts *SnapshotTestSuite) LoadTestCases(testFile string) error + func (sts *SnapshotTestSuite) SaveTestCases(testFile string) error + type SystemInfo struct + GOARCH string + GOOS string + GoVersion string + MemStats runtime.MemStats + NumCPU int + NumGoroutine int + type SystemResourcesProfile struct + GOARCH string + GOOS string + NumCPU int + NumGoroutines int