MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / toJsonString

Method toJsonString

Source/Falcor/Utils/Timing/Profiler.cpp:243–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241// Profiler::Capture
242
243std::string Profiler::Capture::toJsonString() const
244{
245 using namespace pybind11::literals;
246
247 // We use pythons JSON encoder to encode the python dictionary to a JSON string.
248 pybind11::module json = pybind11::module::import("json");
249 pybind11::object dumps = json.attr("dumps");
250 return pybind11::cast<std::string>(dumps(toPython(*this), "indent"_a = 2));
251}
252
253void Profiler::Capture::writeToFile(const std::filesystem::path& path) const
254{

Callers

nothing calls this directly

Calls 1

toPythonFunction · 0.70

Tested by

no test coverage detected