mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
18 lines
611 B
Python
Executable file
18 lines
611 B
Python
Executable file
from django.http import JsonResponse
|
|
from django.views import View
|
|
|
|
from apps.statistics.models import MStatistics
|
|
|
|
class DbTimes(View):
|
|
|
|
|
|
def get(self, request):
|
|
|
|
return JsonResponse({
|
|
'sql_avg': MStatistics.get('latest_sql_avg'),
|
|
'mongo_avg': MStatistics.get('latest_mongo_avg'),
|
|
'redis_avg': MStatistics.get('latest_redis_avg'),
|
|
'task_sql_avg': MStatistics.get('latest_task_sql_avg'),
|
|
'task_mongo_avg': MStatistics.get('latest_task_mongo_avg'),
|
|
'task_redis_avg': MStatistics.get('latest_task_redis_avg'),
|
|
})
|