d29f055713636c5629ddb7f48805536d39e550cb,debug_toolbar/panels/sql.py,SQLDebugPanel,nav_subtitle,#SQLDebugPanel#,152

Before Change


        return _("SQL")

    def nav_subtitle(self):
        self._queries = connection.queries[self._offset:]
        self._sql_time = sum([q["duration"] for q in self._queries])
        num_queries = len(self._queries)
        // TODO l10n: use ngettext
        return "%d %s in %.2fms" % (

After Change


        return _("SQL")

    def nav_subtitle(self):
        self._queries = []
        self._databases = {}
        for alias in connections:
            db_queries = connections[alias].queries[self._offset[alias]:]
            self._databases[alias] = {
                "time_spent": sum(q["duration"] for q in db_queries),
                "queries": len(db_queries),
            }
            self._queries.extend([(alias, q) for q in db_queries])

        self._queries.sort(key=lambda x: x[1]["start_time"])
        self._sql_time = sum([d["time_spent"] for d in self._databases.itervalues()])
        num_queries = len(self._queries)
        // TODO l10n: use ngettext
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: jazzband/django-debug-toolbar
Commit Name: d29f055713636c5629ddb7f48805536d39e550cb
Time: 2011-03-24
Author: dcramer@gmail.com
File Name: debug_toolbar/panels/sql.py
Class Name: SQLDebugPanel
Method Name: nav_subtitle


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 19bcced2c09ddcf559237bfcf4db4e6ebc321c79
Time: 2019-12-26
Author: liubrandon@google.com
File Name: perfkitbenchmarker/linux_benchmarks/openfoam_benchmark.py
Class Name:
Method Name: Run


Project Name: jazzband/django-debug-toolbar
Commit Name: 634bd0d68cb30d25705a049d46aa72e9a64e9dbd
Time: 2011-04-06
Author: rob@cogit8.org
File Name: debug_toolbar/panels/sql.py
Class Name: SQLDebugPanel
Method Name: nav_subtitle