def retrieveVals(self):
if self._stats is None:<EOL><INDENT>serverInfo = MemcachedInfo(self._host,  self._port, self._socket_file)<EOL>stats = serverInfo.getStats()<EOL><DEDENT>else:<EOL><INDENT>stats = self._stats<EOL><DEDENT>if stats is None:<EOL><INDENT>raise Exception("<STR_LIT>")        <EOL><DEDENT>stats['<STR_LIT>'] = stats.get('<STR_LIT>')<EOL>if stats.has_key('<STR_LIT>') and stats.has_key('<STR_LIT>'): <EOL><INDENT>stats['<STR_LIT>'] = stats['<STR_LIT>'] - stats['<STR_LIT>']<EOL><DEDENT>self.saveState(stats)<EOL>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>if self.graphHasField('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>',<EOL>safe_sum([stats.get('<STR_LIT>'), <EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.graphHasField('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>',<EOL>safe_sum([stats.get('<STR_LIT>'), <EOL>stats.get('<STR_LIT>'), <EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.graphHasField('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>',<EOL>safe_sum([stats.get('<STR_LIT>'), <EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.graphHasField('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>',<EOL>safe_sum([stats.get('<STR_LIT>'), <EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>safe_sum([stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>safe_sum([stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>safe_sum([stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>safe_sum([stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>safe_sum([stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>'),<EOL>stats.get('<STR_LIT>')]))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>if self.graphHasField('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', <EOL>stats.get('<STR_LIT>'))<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>prev_stats = self._prev_stats<EOL>for (field_name,  field_hits,  field_misses) in (<EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>'),<EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>'), <EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>'), <EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>'), <EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>'), <EOL>('<STR_LIT>',  '<STR_LIT>',  '<STR_LIT>')<EOL>):<EOL><INDENT>if prev_stats:<EOL><INDENT>if (stats.has_key(field_hits) <EOL>and prev_stats.has_key(field_hits)<EOL>and stats.has_key(field_misses) <EOL>and prev_stats.has_key(field_misses)):<EOL><INDENT>hits = stats[field_hits] - prev_stats[field_hits]<EOL>misses = stats[field_misses] - prev_stats[field_misses]<EOL>total = hits + misses<EOL>if total > <NUM_LIT:0>:<EOL><INDENT>val = <NUM_LIT> * hits / total<EOL><DEDENT>else:<EOL><INDENT>val = <NUM_LIT:0><EOL><DEDENT>self.setGraphVal('<STR_LIT>',  field_name, <EOL>round(val,  <NUM_LIT:2>))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Retrieve values for graphs.