Add function and running time analyze.