def retrieveVals(self):
stats = self._dbconn.getDatabaseStats()<EOL>databases = stats.get('<STR_LIT>')<EOL>totals = stats.get('<STR_LIT>')<EOL>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>limit = self._dbconn.getParam('<STR_LIT>')<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', limit)<EOL>for (db, dbstats) in databases.iteritems():<EOL><INDENT>if self.dbIncluded(db):<EOL><INDENT>self.setGraphVal('<STR_LIT>', db, <EOL>dbstats['<STR_LIT>'])<EOL><DEDENT><DEDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>for (db, dbstats) in databases.iteritems():<EOL><INDENT>if self.dbIncluded(db):<EOL><INDENT>self.setGraphVal('<STR_LIT>', db, dbstats['<STR_LIT>'])<EOL><DEDENT><DEDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL>self.setGraphVal('<STR_LIT>', '<STR_LIT>', totals['<STR_LIT>'])<EOL><DEDENT>lock_stats = None<EOL>for lock_state in ('<STR_LIT:all>', '<STR_LIT>',):<EOL><INDENT>graph_name = "<STR_LIT>" % lock_state<EOL>if self.hasGraph(graph_name):<EOL><INDENT>if lock_stats is None:<EOL><INDENT>lock_stats = self._dbconn.getLockStatsMode()<EOL><DEDENT>mode_iter = iter(PgInfo.lockModes)<EOL>for mode in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',):<EOL><INDENT>self.setGraphVal(graph_name, mode, <EOL>lock_stats[lock_state].get(mode_iter.next()))<EOL><DEDENT><DEDENT><DEDENT>stats = None               <EOL>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>if stats is None:<EOL><INDENT>stats = self._dbconn.getBgWriterStats()<EOL><DEDENT>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>if stats is None:<EOL><INDENT>stats = self._dbconn.getBgWriterStats()<EOL><DEDENT>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><DEDENT>if self._detailGraphs:<EOL><INDENT>for (db, dbstats) in databases.iteritems():<EOL><INDENT>if self.dbIncluded(db):<EOL><INDENT>if self.hasGraph('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', db, <EOL>dbstats['<STR_LIT>'] + dbstats['<STR_LIT>'])<EOL><DEDENT>for (graph_name, attr_name) in (<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>):<EOL><INDENT>if self.hasGraph(graph_name):<EOL><INDENT>self.setGraphVal(graph_name, db, dbstats[attr_name])<EOL><DEDENT><DEDENT>lock_stats_db = None<EOL>for lock_state in ('<STR_LIT:all>', '<STR_LIT>',):<EOL><INDENT>graph_name = "<STR_LIT>" % lock_state<EOL>if self.hasGraph(graph_name):<EOL><INDENT>if lock_stats_db is None:<EOL><INDENT>lock_stats_db = self._dbconn.getLockStatsDB()<EOL><DEDENT>self.setGraphVal(graph_name, db, <EOL>lock_stats_db[lock_state].get(db, <NUM_LIT:0>))<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if self._replGraphs:<EOL><INDENT>repl_stats = self._dbconn.getSlaveConflictStats()<EOL>if self.hasGraph('<STR_LIT>'):        <EOL><INDENT>for field in self.getGraphFieldList('<STR_LIT>'):<EOL><INDENT>self.setGraphVal('<STR_LIT>', field, <EOL>repl_stats['<STR_LIT>'].get("<STR_LIT>" % field))<EOL><DEDENT><DEDENT>if self._detailGraphs and self.hasGraph('<STR_LIT>'):<EOL><INDENT>for (db, dbstats) in repl_stats['<STR_LIT>'].iteritems():<EOL><INDENT>if self.dbIncluded(db):<EOL><INDENT>self.setGraphVal('<STR_LIT>', db,<EOL>sum(dbstats.values()))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Retrieve values for graphs.