Not sure about memory usage, maybe strace has something you could use, or taking a "snapshot" of free before and after running the program. For program runtime, just use the "time" command, such as
Code:
time xterm -e firefox
Once the program has exited, it will print the time (both user and system) the application used.
Hope that helps.