@tornado.gen.coroutine<EOL><INDENT>def get(self):<DEDENT>
cluster = self.get_argument("<STR_LIT>")<EOL>environ = self.get_argument("<STR_LIT>")<EOL>topology = self.get_argument("<STR_LIT>")<EOL>component = self.get_argument("<STR_LIT>", default=None)<EOL>metricnames = self.get_arguments("<STR_LIT>")<EOL>instances = self.get_arguments("<STR_LIT>")<EOL>interval = self.get_argument("<STR_LIT>", default=-<NUM_LIT:1>)<EOL>time_range = (<NUM_LIT:0>, interval)<EOL>compnames = [component] if component else (yield access.get_comps(cluster, environ, topology))<EOL>futures = {}<EOL>for comp in compnames:<EOL><INDENT>future = access.get_comp_metrics(<EOL>cluster, environ, topology, comp, instances,<EOL>metricnames, time_range)<EOL>futures[comp] = future<EOL><DEDENT>results = yield futures<EOL>self.write(results[component] if component else results)<EOL>
:return: