def get(self):
sort = self.get_argument('<STR_LIT>', '<STR_LIT>')<EOL>count = self.get_argument('<STR_LIT:count>', <NUM_LIT:20>)<EOL>strip_dirs = self.get_argument('<STR_LIT>', True)<EOL>error = '<STR_LIT>'<EOL>sorts = ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>')<EOL>if sort not in sorts:<EOL><INDENT>error += "<STR_LIT>" % (sort, sorts)<EOL><DEDENT>try:<EOL><INDENT>count = int(count)<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>error += "<STR_LIT>" % count<EOL><DEDENT>if count <= <NUM_LIT:0>:<EOL><INDENT>count = None<EOL><DEDENT>strip_dirs = str(strip_dirs).lower() not in ('<STR_LIT:false>', '<STR_LIT>', '<STR_LIT:none>',<EOL>'<STR_LIT:null>', '<STR_LIT:0>', '<STR_LIT>')<EOL>if error:<EOL><INDENT>self.write({'<STR_LIT:error>': error})<EOL>self.set_status(<NUM_LIT>)<EOL>self.finish()<EOL>return<EOL><DEDENT>try:<EOL><INDENT>statistics = get_profiler_statistics(sort, count, strip_dirs)<EOL>self.write({'<STR_LIT>': statistics})<EOL>self.set_status(<NUM_LIT:200>)<EOL><DEDENT>except TypeError:<EOL><INDENT>logger.exception('<STR_LIT>')<EOL>self.write({'<STR_LIT:error>': '<STR_LIT>'})<EOL>self.set_status(<NUM_LIT>)<EOL><DEDENT>self.finish()<EOL>
Return current profiler statistics.