Page MenuHomePhabricator

Show Query Totals Next to Tab Titles in Panels
Closed, WontfixPublic

Description

If you use the tab feature to break down a project into several categories, it would be useful to have a total number next to the title of each tab.

Event Timeline

ankrgyl raised the priority of this task from to Needs Triage.
ankrgyl updated the task description. (Show Details)
ankrgyl added a project: Dashboards.
ankrgyl added a subscriber: ankrgyl.
chad claimed this task.
chad added a subscriber: chad.

We don't plan to pursue this in the upstream as it's very costly (and the tabs are ajaxed).

Can you suggest an alternative for producing this kind of report? In our case, each tab corresponds to a component in the engine, and it would be valuable to visualize the total task count per component in dashboard.

@chad when you say its super costly, you mean from the SQL queries perspective? In terms of implementation it should be essentially running something like SQL_CALC_FOUND_ROWS and returning the total number along with the results to the frontend.

As a middle-ground, one option could be to show the amount of results that you get back from the query (which would be <= the limit for the query), and if it is at the limit you could say (100+) or something. That would be fine for our use case and be strictly more information than is currently there (without any additional queries).

If this way of solving the feature was reasonable I would be willing to take a crack at it.

@epriestley is the performance guardian you seek, though he is in the next castle.

We can't show users a SQL_CALC_FOUND_ROWS because it may reveal information they don't have permission to see. We have to load all the objects and privacy filter them in the application. As you mention, there are various ways to approach this which would probably get you want you want (e.g., count for 0..99 and then show "99+", as we do on the home page), but even this is more queries than we currently need to perform (1 query to get a count, and we have to actually load all the results and privacy filter them, vs 0 queries to just render a tab title and load the tab when you click it). We don't actually issue 0 queries today, I think, but this is an optimization which is readily available now and unavailable if we implement a count.

Beyond the actual technical details, it's not really clear what problem this is solving. This is something we might pursue if we believed it was a good solution to a common problem, but as filed this request is just describing the feature you're interested in, not the root problem it solves. See:

https://secure.phabricator.com/book/phabcontrib/article/feature_requests/#describe-problems

We're aware of a few classes of common problems in this space (e.g., weak reporting features, poor tools for understanding and reviewing project status) but believe there are much better and more powerful/general solutions to the problem classes we're currently aware of. If your problem is also a problem in one of these classes, we'd prefer to solve it by providing a full capability set rather than mitigating it in one niche use case. But basically we can't really tell what your actual need is.

Upshot: there's no trivial fix here which we'd accept in the upstream.

If you can describe the problem you're facing more generally, we may be able to come up with a solution to it (or may already have a solution which just isn't obvious), but we're unlikely to move forward with it until the next dashboards/projects iteration, which is probably a ways out.

Happy to provide some background. This is for tracking the per-component breakdown of tasks for MemSQL's database engine. We'd be happy to jump on skype/hangouts/webex/whatever and let you poke around our setup if you'd like.

We're using projects to organize our tasks across 3 dimensions: major release, task-type (feature, regression, unbuilt test, etc), and component (data loading, query execution, etc.). We like projects for 2 reasons: (a) they let us organize tasks by multiple dimensions and (b) you can change the value on any of the 3 dimensions and preserve the other categorizations (this is most relevant when we kick something out of a major release). From what we can tell, projects are the best way to accomplish this today on Phabricator.

Now that we have a lot of tasks categorized this way, we're trying to use dashboard to make sense this information. At a high level, we would like to poke around the set of tasks for a given release by slicing and dicing on the task-type and component dimensions (for a given major release). This includes seeing counts as well as lists of tasks. So far, the main view we're using is a per-task-type breakdown by component. It's one tabbed panel per task-type and one tab per component (there are currently 12, see T7219). Each tab is a query that pulls all the tasks for a given task-type and component. This works very well for browsing the set of tasks for a task-type, component pair, and we're very happy with what we have so far. The request here is to make comparing the totals for a given task-type, component pair just as easy. The way it would fit most obviously into our current dashboard-based model would be via a totals-count per tab, but we're more than happy to do something else and work with you on it.

Ankur beat me too it. I am curious if you guys have solved this particular issue via using another feature of phabricator rather than custom queries/dashboards. If so I would like to see what you guys are doing.

@epriestley and @chad - wanted to follow up and hear your thoughts on this if you've had a chance to review