MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _profiler_capture

Method _profiler_capture

core/debugger/remote_debugger.cpp:721–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721Error RemoteDebugger::_profiler_capture(const String &p_cmd, const Array &p_data, bool &r_captured) {
722 r_captured = false;
723 ERR_FAIL_COND_V(p_data.is_empty(), ERR_INVALID_DATA);
724 ERR_FAIL_COND_V(p_data[0].get_type() != Variant::BOOL, ERR_INVALID_DATA);
725 ERR_FAIL_COND_V(!has_profiler(p_cmd), ERR_UNAVAILABLE);
726 Array opts;
727 if (p_data.size() > 1) { // Optional profiler parameters.
728 ERR_FAIL_COND_V(p_data[1].get_type() != Variant::ARRAY, ERR_INVALID_DATA);
729 opts = p_data[1];
730 }
731 r_captured = true;
732 profiler_enable(p_cmd, p_data[0], opts);
733 return OK;
734}
735
736RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) {
737 peer = p_peer;

Callers 1

RemoteDebuggerMethod · 0.80

Calls 3

sizeMethod · 0.65
is_emptyMethod · 0.45
get_typeMethod · 0.45

Tested by

no test coverage detected