code: def calls(self, truncate=False):
          
  
          if self.pg_stat_statement():
              if truncate:
                  select = """
                      SELECT CASE
                          WHEN length(query) < 40
                          THEN query
                          ELSE substr(query, 0, 38) || '..'
                      END AS qry,
                  """
              else:
                  select = 'SELECT query,'
  
              return self.execute(sql.CALLS.format(select=select))
          else:
              return [self.get_missing_pg_stat_statement_error()]
docs: Show 10 most frequently called queries. Requires the pg_stat_statements
          Postgres module to be installed.
  
          Record(
              query='BEGIN;',
              exec_time=datetime.timedelta(0, 0, 288174),
              prop_exec_time='0.0%',
              ncalls='845590',
              sync_io_time=datetime.timedelta(0)
          )
  
          :param truncate: trim the Record.query output if greater than 40 chars
          :returns: list of Records