MCPcopy Create free account
hub / github.com/google/pprof / settingsDirAndFile

Function settingsDirAndFile

internal/driver/settings_test.go:14–20  ·  view source on GitHub ↗

settingsDirAndFile returns a directory in which settings should be stored and the name of the settings file. The caller must delete the directory when done.

(t *testing.T)

Source from the content-addressed store, hash-verified

12// and the name of the settings file. The caller must delete the directory when
13// done.
14func settingsDirAndFile(t *testing.T) (string, string) {
15 tmpDir, err := os.MkdirTemp("", "pprof_settings_test")
16 if err != nil {
17 t.Fatalf("error creating temporary directory: %v", err)
18 }
19 return tmpDir, filepath.Join(tmpDir, "settings.json")
20}
21
22func TestSettings(t *testing.T) {
23 tmpDir, fname := settingsDirAndFile(t)

Callers 3

TestSettingsFunction · 0.85
TestConfigMenuFunction · 0.85
TestEditConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…