MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / BuildTempPath

Method BuildTempPath

src/benchmark/Performance.cpp:351–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349
350private:
351 std::string BuildTempPath(const std::string& source_config_path,
352 const std::string& suffix) {
353 const std::string base_name =
354 GetBaseNameWithoutExtension(source_config_path) + "." + suffix;
355 const std::string pid = GetProcessIdString();
356 std::string path;
357 do {
358 path = BenchmarkTempDirectory() + base_name + "." + pid + "." +
359 std::to_string(counter_++) + ".json";
360 } while (IsRegularFile(path));
361 return path;
362 }
363
364 int counter_ = 0;
365 std::vector<std::string> paths_;

Callers

nothing calls this directly

Calls 4

GetProcessIdStringFunction · 0.85
BenchmarkTempDirectoryFunction · 0.85
IsRegularFileFunction · 0.70

Tested by

no test coverage detected