You can get the amount of memory being used with the
OS.get_static_memory_usage() method, which'll show an estimation of used memory in bytes. As for CPU usage, probably not.
You can also look at the memory usage straight from the editor during runtime by accessing the "Monitors" tab in the Debugger and checking "Static" under "Memory"
The monitor has lots of useful metrics for optimization and debugging.