MCPcopy
hub / github.com/runfinch/finch / GetSubject

Function GetSubject

benchmark/benchmark.go:53–64  ·  view source on GitHub ↗

GetSubject returns the testing subject based on INSTALLED flag.

()

Source from the content-addressed store, hash-verified

51
52// GetSubject returns the testing subject based on INSTALLED flag.
53func GetSubject() (string, error) {
54 wd, err := os.Getwd()
55 if err != nil {
56 return "", fmt.Errorf("failed to get the current working directory: %w", err)
57 }
58
59 subject := filepath.Join(wd, "../../_output/bin/finch")
60 if *Installed {
61 subject = InstalledTestSubject
62 }
63 return subject, nil
64}
65
66// Wrapper reports the benchmarking metrics of targetFunc to testing.B.
67func Wrapper(b *testing.B, targetFunc func(), cleanupFunc func()) {

Callers 1

SetupMethod · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected