Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending panels with statistics (e.g. SqlAlchemy) #316

Open
jvanasco opened this issue Jun 8, 2017 · 0 comments
Open

Extending panels with statistics (e.g. SqlAlchemy) #316

jvanasco opened this issue Jun 8, 2017 · 0 comments

Comments

@jvanasco
Copy link
Contributor

jvanasco commented Jun 8, 2017

I found it useful to extend the SqlAlchemy panel with this quick template fix to show some high-level statistics:

% if queries:
	<%
		durations = sorted([query['duration'] for query in queries])
		d_total = sum(durations)
	%>
	<p>
		Total: <span class="label label-default">${d_total} ms</span>.
		Min: <span class="label label-default">${durations[0]} ms</span>.
		Max: <span class="label label-default">${durations[-1]} ms</span>.
	</p>
	<hr/>
% endif

Between that and the "sticky panel" feature, I've been able to track down a lot of bottlenecks during development pretty well.

Is anyone else using similar stats / have suggestions?

I am thinking about a PR that includes this data, but computed within Python (so other panels could potentially share information. The general idea is that I'd like to eventually have a Single panel that uses Chart.js (or similar) to visually display workloads processed by multiple panels (e.g. SqlAlchemy + Dogpile ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant