Getting performance data in a log file

I am looking at improving performance of libcocos engine and I am using the cocos-benchmark as measuring performance. I see statistics e.g. Framerate, Draw Call, GFX Texture Mem shown in the screen when I run benchmarks. Is there a way to capture these stats in a log file or something? What file I need to modify to capture this? Any help will be appreciated.