MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / unique_string

Function unique_string

src/tmp_dir.cpp:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static std::string unique_string(const std::string& prefix)
69{
70 auto pid = getpid();
71 auto tid = std::this_thread::get_id();
72 auto clk = std::chrono::steady_clock::now().time_since_epoch().count();
73 std::stringstream ss;
74 ss << std::hex << prefix << "-" << pid << "-" << tid << "-" << clk << "-" << random_string(16);
75 return ss.str();
76}
77
78tmp_dir::tmp_dir(std::string_view prefix)
79 : path(fs::temp_directory_path() /

Callers 1

tmp_dirMethod · 0.85

Calls 2

random_stringFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected