# Path: django_performance_testing/context.py
# class Context(object):
# class scoped_context(object):
#     def __init__(self):
#     def enter(self, key, value):
#     def exit(self, key, value):
#     def __init__(self, key, value, context=None):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: django_performance_testing/signals.py



import copy
import functools
import pprint
import traceback
from django.conf import settings
from django_performance_testing import context
from django_performance_testing.signals import results_collected
    @property
    def collector_text(self):
        if self.limit_obj.is_anonymous():
            return ''
        return ' (for {})'.format(self.limit_obj.collector_id)

    @property
    def actual(self):
        return str(self.result)

    @property
    def limit(self):
        return self.limit_obj.limit_for(self.result)

    def clone_with_more_info(self, orig_tb):
        return LimitViolationError(
            limit_obj=self.limit_obj, result=self.result,
            context=self.context, tb=orig_tb)


class BaseCollector(object):

    def __init__(self, id_=None):
        self.id_ = id_

    def should_have_unique_id(self):
        return self.id_ is not None

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.before_exit()

# Path: django_performance_testing/context.py
# class Context(object):
# class scoped_context(object):
#     def __init__(self):
#     def enter(self, key, value):
#     def exit(self, key, value):
#     def __init__(self, key, value, context=None):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# 
# Path: django_performance_testing/signals.py



# Path: django_performance_testing/core.py
import copy
import functools
import pprint
import traceback
from django.conf import settings
from django_performance_testing import context
from django_performance_testing.signals import results_collected

    @property
    def collector_text(self):
        if self.limit_obj.is_anonymous():
            return ''
        return ' (for {})'.format(self.limit_obj.collector_id)

    @property
    def actual(self):
        return str(self.result)

    @property
    def limit(self):
        return self.limit_obj.limit_for(self.result)

    def clone_with_more_info(self, orig_tb):
        return LimitViolationError(
            limit_obj=self.limit_obj, result=self.result,
            context=self.context, tb=orig_tb)


class BaseCollector(object):

    def __init__(self, id_=None):
        self.id_ = id_

    def should_have_unique_id(self):
        return self.id_ is not None

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.before_exit()

        signal_responses = results_collected.send_robust(