Merge pull request #2977 from edx/zoldak/kill-perfstats
Kill the perfstats module, which is unused
This commit is contained in:
@@ -43,8 +43,6 @@ CC_MERCHANT_NAME = PLATFORM_NAME
|
||||
COURSEWARE_ENABLED = True
|
||||
ENABLE_JASMINE = False
|
||||
|
||||
PERFSTATS = False
|
||||
|
||||
DISCUSSION_SETTINGS = {
|
||||
'MAX_COMMENT_DEPTH': 2,
|
||||
}
|
||||
@@ -1096,7 +1094,6 @@ INSTALLED_APPS = (
|
||||
# Our courseware
|
||||
'circuit',
|
||||
'courseware',
|
||||
'lms.lib.perfstats',
|
||||
'student',
|
||||
'static_template_view',
|
||||
'staticbook',
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import json
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import connection
|
||||
|
||||
import views
|
||||
|
||||
|
||||
class ProfileMiddleware:
|
||||
def process_request(self, request):
|
||||
self.t = time.time()
|
||||
print "Process request"
|
||||
|
||||
def process_response(self, request, response):
|
||||
# totalTime = time.time() - self.t
|
||||
# tmpfile = tempfile.NamedTemporaryFile(prefix='sqlprof-t=' + str(totalTime) + "-", delete=False)
|
||||
|
||||
# output = ""
|
||||
# for query in connection.queries:
|
||||
# output += "Time: " + str(query['time']) + "\nQuery: " + query['sql'] + "\n\n"
|
||||
|
||||
# tmpfile.write(output)
|
||||
|
||||
# print "SQL Log file: " , tmpfile.name
|
||||
# tmpfile.close()
|
||||
|
||||
# print "Process response"
|
||||
return response
|
||||
@@ -1 +0,0 @@
|
||||
# Create your models here.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Create your views here.
|
||||
import middleware
|
||||
|
||||
from django.http import HttpResponse
|
||||
|
||||
|
||||
def end_profile(request):
|
||||
names = middleware.restart_profile()
|
||||
return HttpResponse(str(names))
|
||||
@@ -153,9 +153,6 @@ for key, value in settings.MKTG_URL_LINK_MAP.items():
|
||||
{'template': template}, name=value),)
|
||||
|
||||
|
||||
if settings.PERFSTATS:
|
||||
urlpatterns += (url(r'^reprofile$', 'lms.lib.perfstats.views.end_profile'),)
|
||||
|
||||
# Multicourse wiki (Note: wiki urls must be above the courseware ones because of
|
||||
# the custom tab catch-all)
|
||||
if settings.WIKI_ENABLED:
|
||||
|
||||
Reference in New Issue
Block a user