Skip to content
Snippets Groups Projects
Commit fe8abca9 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-45: removed silk for general deployment

parent 9069dc51
No related branches found
No related tags found
1 merge request!89Monitoring maintenance Epic branch merge
......@@ -47,11 +47,10 @@ INSTALLED_APPS = [
'rest_framework',
'django_filters',
'lofar.maintenance.monitoringdb.apps.MonitoringDbConfig',
'silk'
]
MIDDLEWARE = [
'silk.middleware.SilkyMiddleware',
# 'silk.middleware.SilkyMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
......@@ -62,8 +61,8 @@ MIDDLEWARE = [
]
ROOT_URLCONF = 'lofar.maintenance.django_postgresql.urls'
SILKY_PYTHON_PROFILER = True
SILKY_PYTHON_PROFILER_BINARY = True
# SILKY_PYTHON_PROFILER = True
# SILKY_PYTHON_PROFILER_BINARY = True
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
......
......@@ -18,11 +18,8 @@ from django.conf.urls import include, url
from django.conf import settings
from django.conf.urls.static import static
from lofar.maintenance.monitoringdb.urls import urlpatterns as urls
urlpatterns = [] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns = [
# path('', include('lofar.maintenance.monitoringdb.urls'))
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from lofar.maintenance.monitoringdb.urls import urlpatterns as urls
urlpatterns += urls
urlpatterns += [url(r'^silk/', include('silk.urls', namespace='silk'))]
\ No newline at end of file
......@@ -217,8 +217,6 @@ def compute_error_summary(station_test: StationTest, selected_error_types=None):
from django.db.models import Window, F
from django.db.models.functions import Rank
from silk.profiling.profiler import silk_profile
class ControllerStationOverview(ValidableReadOnlyView):
description = "Overview of the latest tests performed on the stations"
......@@ -348,7 +346,6 @@ class ControllerStationOverview(ValidableReadOnlyView):
return rtsm_per_station
@silk_profile(name='Computing response')
def compute_response(self):
station_entities = Station.objects.all()
......@@ -416,7 +413,6 @@ class ControllerStationTestsSummary(ValidableReadOnlyView):
)
]
@silk_profile(name='Computing response')
def compute_response(self):
from_date = timezone.now() - timezone.timedelta(days=self.lookback_time)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment