MCPcopy Create free account
hub / github.com/bytedance/bolt / createTraceDirectory

Function createTraceDirectory

bolt/exec/TraceUtil.cpp:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51} // namespace
52
53void createTraceDirectory(const std::string& traceDir) {
54 try {
55 std::unordered_map<std::string, std::string> emptyConfigStrs;
56 auto emptyConfig =
57 std::make_shared<config::ConfigBase>(std::move(emptyConfigStrs));
58 const auto fs = filesystems::getFileSystem(traceDir, emptyConfig);
59 if (fs->exists(traceDir)) {
60 fs->rmdir(traceDir);
61 }
62 fs->mkdir(traceDir);
63 } catch (const std::exception& e) {
64 BOLT_FAIL(
65 "Failed to create trace directory '{}' with error: {}",
66 traceDir,
67 e.what());
68 }
69}
70
71std::string getQueryTraceDirectory(
72 const std::string& traceDir,

Callers 3

maybeInitTraceMethod · 0.85
maybeSetTracerMethod · 0.85
TEST_FFunction · 0.85

Calls 5

getFileSystemFunction · 0.85
existsMethod · 0.45
rmdirMethod · 0.45
mkdirMethod · 0.45
whatMethod · 0.45

Tested by 1

TEST_FFunction · 0.68