Initial release: Go Jdenticon library v0.1.0

- Core library with SVG and PNG generation
- CLI tool with generate and batch commands
- Cross-platform path handling for Windows compatibility
- Comprehensive test suite with integration tests
This commit is contained in:
Kevin McIntyre
2026-01-02 23:56:48 -05:00
parent f84b511895
commit d9e84812ff
292 changed files with 19725 additions and 38884 deletions

View File

@@ -0,0 +1,43 @@
//go:build perf
package perfsuite_test
import (
"os"
"testing"
"github.com/ungluedlabs/go-jdenticon/internal/perfsuite"
)
// TestPerformanceRegressionSuite can be called from a regular Go test
func TestPerformanceRegressionSuite(t *testing.T) {
if testing.Short() {
t.Skip("Skipping performance regression tests in short mode")
}
suite := perfsuite.NewPerformanceSuite()
suite.FailOnRegress = false // Don't fail tests, just report
// Check if we should establish baselines
if os.Getenv("ESTABLISH_BASELINES") == "true" {
if err := suite.EstablishBaselines(); err != nil {
t.Fatalf("Failed to establish baselines: %v", err)
}
return
}
// Run regression check
if err := suite.CheckForRegressions(); err != nil {
t.Logf("Performance regression check completed with issues: %v", err)
// Don't fail the test, just log the results
}
}
// BenchmarkPerformanceSuite runs all performance benchmarks for standard Go bench testing
func BenchmarkPerformanceSuite(b *testing.B) {
suite := perfsuite.NewPerformanceSuite()
for _, bench := range suite.Benchmarks {
b.Run(bench.Name, bench.BenchmarkFunc)
}
}