MCPcopy
hub / github.com/kopia/kopia / TestCommandBenchmarkCompression

Function TestCommandBenchmarkCompression

cli/command_benchmark_test.go:49–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestCommandBenchmarkCompression(t *testing.T) {
50 t.Parallel()
51
52 runner := testenv.NewInProcRunner(t)
53 e := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, runner)
54
55 testFile := filepath.Join(testutil.TempDirectory(t), "testfile.txt")
56 os.WriteFile(testFile, bytes.Repeat([]byte{1, 2, 3, 4, 5, 6}, 10000), 0o600)
57
58 e.RunAndExpectSuccess(t, "benchmark", "compression", "--data-file", testFile, "--repeat=2", "--verify-stable", "--print-options")
59 e.RunAndExpectSuccess(t, "benchmark", "compression", "--data-file", testFile, "--repeat=2", "--by-size")
60}

Callers

nothing calls this directly

Calls 6

RunAndExpectSuccessMethod · 0.95
NewInProcRunnerFunction · 0.92
NewCLITestFunction · 0.92
TempDirectoryFunction · 0.92
RepeatMethod · 0.80
WriteFileMethod · 0.65

Tested by

no test coverage detected