# Path: stackimpact/runtime.py
# class runtime_info(object):
#     OS_LINUX = (sys.platform.startswith('linux'))
#     OS_DARWIN = (sys.platform == 'darwin')
#     OS_WIN = (sys.platform == 'win32')
#     PYTHON_2 = (sys.version_info.major == 2)
#     PYTHON_3 = (sys.version_info.major == 3)
#     GEVENT = False


import threading
import os
import re
import importlib
    import gevent
from .runtime import runtime_info
        self.system_frame_cache = None

        self.include_agent_frames = None
        self.include_system_frames = None

        self.agent_dir = os.path.dirname(os.path.realpath(__file__))
        self.system_dir = os.path.dirname(os.path.realpath(threading.__file__))
        if runtime_info.GEVENT:
            self.gevent_dir = os.path.dirname(os.path.realpath(gevent.__file__))


    def start(self):
        self.agent_frame_cache = dict()
        self.system_frame_cache = dict()

        self.include_agent_frames = self.agent.get_option('include_agent_frames')
        self.include_system_frames = self.agent.get_option('include_system_frames')

    def stop(self):
        pass


    def is_agent_frame(self, filename):
        if filename in self.agent_frame_cache:
            return self.agent_frame_cache[filename]

        agent_frame = False

        if not self.include_agent_frames:
            if filename.startswith(self.agent_dir):

# Path: stackimpact/runtime.py
# class runtime_info(object):
#     OS_LINUX = (sys.platform.startswith('linux'))
#     OS_DARWIN = (sys.platform == 'darwin')
#     OS_WIN = (sys.platform == 'win32')
#     PYTHON_2 = (sys.version_info.major == 2)
#     PYTHON_3 = (sys.version_info.major == 3)
#     GEVENT = False


# Path: stackimpact/frame_cache.py
import threading
import os
import re
import importlib
    import gevent
from .runtime import runtime_info

        self.system_frame_cache = None

        self.include_agent_frames = None
        self.include_system_frames = None

        self.agent_dir = os.path.dirname(os.path.realpath(__file__))
        self.system_dir = os.path.dirname(os.path.realpath(threading.__file__))
        if runtime_info.GEVENT:
            self.gevent_dir = os.path.dirname(os.path.realpath(gevent.__file__))


    def start(self):
        self.agent_frame_cache = dict()
        self.system_frame_cache = dict()

        self.include_agent_frames = self.agent.get_option('include_agent_frames')
        self.include_system_frames = self.agent.get_option('include_system_frames')

    def stop(self):
        pass


    def is_agent_frame(self, filename):
        if filename in self.agent_frame_cache:
            return self.agent_frame_cache[filename]

        agent_frame = False

        if not self.include_agent_frames:
            if filename.startswith(self.agent_dir):

                agent_frame = True