I am developing an online code judging software for c/c++/java codes.

I want to include various parameters for judging a code ,namely compilation time,execution time,memory usage ,just like the IDEONE API provides with.

How can i extract these parameters while compiling/executing a code in a LINUX environment?Are there any specific commands?

Also are there any other parameters which can be used to judge a code?