End a Frmae.
End this frame.
ResolveQueries.
Write traces to files.
Clear and Reset.
Do not want to capture next frame.
Debug Status.
End this frame.
ResolveQueries.
Write traces to files.
Clear and Reset.
Do not want to capture next frame.
Debug Status.
144 {
146
151
153 {
157 std::vector<nv::perf::mini_trace::APITraceData> apiTraceData;
159 {
161 }
162
166 const std::string yamlText = SerializeAPITraceDataToYaml(apiTraceData);
167 const std::string filename = std::string(
m_OutputDirectory) + NV_PERF_PATH_SEPARATOR +
"traces.yaml";
168 std::ofstream file(filename);
169 if (file.is_open())
170 {
171 file << yamlText;
172 }
173 else
174 {
175 std::stringstream ss;
176 ss << "Failed to open file: " << filename;
177 SPICES_CORE_WARN(ss.str());
178 }
179
183 std::stringstream ss;
184 ss << SPICES_EXTENT_PROCESS_PATH << "TimelineViewer/TimelineViewer.exe";
186
192 SPICES_CORE_INFO("Nsight Perf: One-Shot sampling Finished.");
193 }
194
199 {
201 }
202
207 if (samplerStatus == SamplerStatus::Failed)
208 {
209 SPICES_CORE_ERROR("Nsight Perf: Failed to initialize");
210 }
211 else if (samplerStatus == SamplerStatus::Sampling)
212 {
213 SPICES_CORE_INFO("Nsight Perf: One-Shot is sampling.");
214 }
215 }
#define NSPERF_CHECK(val)
#define SPICES_PROFILE_ZONE
bool m_EnableCaptureNextFrame
True if want capture next frame.
nv::perf::sampler::PeriodicSamplerOneShotVulkan::SamplerStatus SamplerStatus
std::string m_OutputDirectory
OutFile Directory.
std::vector< nv::perf::mini_trace::APITracerVulkan > m_ApiTracers
APITracerVulkan Per FlightFrame.
bool m_IsInSession
True if in Session.
void Reset()
Reset Session.
nv::perf::sampler::PeriodicSamplerOneShotVulkan m_PeriodicSamplerOneShot
PeriodicSamplerOneShotVulkan.
static bool OpenProcess(const char *processPath, const char *commandLine="")
Open a Process with command.