Remove timer

This commit is contained in:
zandercymatics 2024-05-07 14:13:55 -06:00
parent b5784a1a88
commit ca2e2168aa
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 114 additions and 103 deletions

View file

@ -2029,7 +2029,6 @@ class DomainAdmin(ListHeaderAdmin):
def change_view(self, request, object_id):
logger.info("Timing change_view on domain")
with Timer():
# If the analyst was recently editing a domain page,
# delete any associated session values
if "analyst_action" in request.session:

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.10 on 2024-05-06 20:21
# Generated by Django 4.2.10 on 2024-05-07 20:13
from django.db import migrations, models
import phonenumber_field.modelfields
@ -92,6 +92,10 @@ class Migration(migrations.Migration):
model_name="domain",
index=models.Index(fields=["name"], name="registrar_d_name_5b1956_idx"),
),
migrations.AddIndex(
model_name="domaininvitation",
index=models.Index(fields=["status"], name="registrar_d_status_e84571_idx"),
),
migrations.AddIndex(
model_name="domainrequest",
index=models.Index(fields=["requested_domain"], name="registrar_d_request_6894eb_idx"),

View file

@ -15,6 +15,12 @@ logger = logging.getLogger(__name__)
class DomainInvitation(TimeStampedModel):
class Meta:
"""Contains meta information about this class"""
indexes = [
models.Index(fields=["status"]),
]
# Constants for status field
class DomainInvitationStatus(models.TextChoices):
INVITED = "invited", "Invited"

View file

@ -24,6 +24,13 @@ class User(AbstractUser):
but can be customized later.
"""
class Meta:
"""Contains meta information about this class"""
indexes = [
models.Index(fields=["username"]),
models.Index(fields=["email"]),
]
class VerificationTypeChoices(models.TextChoices):
"""
Users achieve access to our system in a few different ways.

View file

@ -380,7 +380,6 @@ def write_csv_for_requests(
def export_data_type_to_csv(csv_file):
"""All domains report with extra columns"""
logger.info("Timing export_data_type_to_csv")
with Timer():
writer = csv.writer(csv_file)
# define columns to include in export
columns = [
@ -420,8 +419,6 @@ def export_data_type_to_csv(csv_file):
def export_data_full_to_csv(csv_file):
"""All domains report"""
logger.info("Timing def export_data_full_to_csv")
with Timer():
writer = csv.writer(csv_file)
# define columns to include in export
columns = [
@ -454,8 +451,6 @@ def export_data_full_to_csv(csv_file):
def export_data_federal_to_csv(csv_file):
"""Federal domains report"""
logger.info("Timing def export_data_federal_to_csv")
with Timer():
writer = csv.writer(csv_file)
# define columns to include in export
columns = [