| 1728 | } |
| 1729 | |
| 1730 | inline void dump_json_function_head(ApiDumpInstance &dump_inst, const char *funcName, const char *funcReturn) { |
| 1731 | const ApiDumpSettings &settings(dump_inst.settings()); |
| 1732 | |
| 1733 | if (!dump_inst.firstFunctionCallOnFrame()) { |
| 1734 | dump_separate_members<ApiDumpFormat::Json>(settings); |
| 1735 | } |
| 1736 | // Display api call name |
| 1737 | dump_json_start_object(settings, 2); |
| 1738 | dump_json_key_value(settings, 3, "name", funcName); |
| 1739 | |
| 1740 | // Display thread info |
| 1741 | if (settings.showThreadAndFrame()) { |
| 1742 | dump_separate_members<ApiDumpFormat::Json>(settings); |
| 1743 | dump_json_key_value(settings, 3, "thread", "Thread ", dump_inst.threadID()); |
| 1744 | } |
| 1745 | |
| 1746 | // Display elapsed time |
| 1747 | if (settings.showTimestamp()) { |
| 1748 | dump_separate_members<ApiDumpFormat::Json>(settings); |
| 1749 | dump_json_key_value(settings, 3, "time", dump_inst.current_time_since_start().count(), " us"); |
| 1750 | } |
| 1751 | |
| 1752 | // Display return type |
| 1753 | dump_separate_members<ApiDumpFormat::Json>(settings); |
| 1754 | dump_json_key_value(settings, 3, "returnType", funcReturn); |
| 1755 | flush(settings); |
| 1756 | } |
| 1757 | |
| 1758 | inline void dump_json_UNUSED(const ApiDumpSettings &settings, const char *type_string, const char *name, int indents) { |
| 1759 | dump_json_start_object(settings, indents); |
no test coverage detected