Displaying Average Response Time

AI-generated summary

In a discussion titled “Displaying Average Response Time” under the “Data & reporting” category with the tag “sql-query”, Léo, a newcomer to Ruby, JavaScript, and SQL, seeks guidance on displaying average response times (last hour, last week, lifetime) on their Discourse forum homepage. They wonder if a plugin is needed or if data from custom SQL queries can be displayed directly. sam advises starting backwards by creating mockups and clearly defining metrics, suggesting that while Data Explorer can expose queries to groups, complex or high-touch features may require a custom plugin. They recommend beginning smaller — first validating whether the needed data is accessible via SQL queries in Data Explorer — before tackling full implementation. The thread emphasizes planning and incremental development for new Discourse contributors.

Hi guys, newbie here, but very excited to start developing. A couple things to preface: when I say newbie, I mean that I have programmed before but I don’t know Ruby, Javascript, or SQL. I’m working on remedying that, but any particular advice with this project would be helpful!

Anyway, for the forum I’m working on, I would like to be able to display the average response time somewhere on the homepage of the forum. I would like to include several different averages, like average response over last hour, over last week, and over the lifetime of the forum.

I figured this plugin would be somehow related to this, but is there a way for me to capture the data from the query I write to display openly on the forum? Or would I have to write my own plugin for that?

Any help would be greatly appreciated, as I am just starting with discourse development so there’s a lot I’m learning all once here. Thanks!

I recommend you start backwards.

Make some mockups of exactly how you want your forum to look and properly define in words what the various concepts you are trying to surface mean.

That will give you a spec to work from.

For very high touch areas that require extensive caching you are going to need a plugin. Data explorer allows you to expose queries to groups so you could expose the ability to run and see it to everyone.

I also recommend you start a lot smaller than this task. Maybe just start by writing the queries you want in data explorer, see if you can even find the data you want.