| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 10e6c70 commit 206c370
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,18 +170,12 @@ static bool EnsureDirectory(const std::string& directory, const char* type) { | |||
| 170 | 170 | } | |
| 171 | 171 | ||
| 172 | 172 | std::string V8CoverageConnection::GetFilename() const { | |
| 173 | - std::string thread_id = std::to_string(env()->thread_id()); | ||
| 174 | - std::string pid = std::to_string(uv_os_getpid()); | ||
| 175 | - std::string timestamp = std::to_string( | ||
| 176 | - static_cast<uint64_t>(GetCurrentTimeInMicroseconds() / 1000)); | ||
| 177 | - char filename[1024]; | ||
| 178 | - snprintf(filename, | ||
| 179 | - sizeof(filename), | ||
| 180 | - "coverage-%s-%s-%s.json", | ||
| 181 | - pid.c_str(), | ||
| 182 | - timestamp.c_str(), | ||
| 183 | - thread_id.c_str()); | ||
| 184 | - return filename; | ||
| 173 | + uint64_t timestamp = | ||
| 174 | + static_cast<uint64_t>(GetCurrentTimeInMicroseconds() / 1000); | ||
| 175 | + return SPrintF("coverage-%s-%s-%s.json", | ||
| 176 | + uv_os_getpid(), | ||
| 177 | + timestamp, | ||
| 178 | + env()->thread_id()); | ||
| 185 | 179 | } | |
| 186 | 180 | ||
| 187 | 181 | void V8ProfilerConnection::WriteProfile(Local<Object> result) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments