Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is It finds the project root by looking for go.mod file
Types ¶
type UniquenessTestStats ¶
type UniquenessTestStats struct {
GeneratedCount int // Number of items successfully generated (TotalAttempts - ErrorCount).
UniqueCount int // Number of unique items among successfully generated ones.
DuplicateCount int // Number of duplicate items found among successfully generated ones.
ErrorCount int // Number of errors encountered during generation.
ActualDuration time.Duration // Total time taken for the test.
}
UniquenessTestStats holds the results from the PerformUniquenessAndPerformanceTest.
func PerformUniquenessAndPerformanceTest ¶
func PerformUniquenessAndPerformanceTest( iterations int, generatorFunc func() (string, error), ) UniquenessTestStats
PerformUniquenessAndPerformanceTest - a utility for functions that produce a string with randomly-generated part for uniqueness - runs a generator function multiple times, checks for uniqueness using the sort-and-scan method, counts errors, and measures performance (maybe useful for the future).
Click to show internal directories.
Click to hide internal directories.