# Path: kano/logging.py
# class lazy_logger:
# class loader:
#     def __getattr__(self, name):
#     def __init__(self, old_mod):
#     def __getattr__(self, name):
# def log_excepthook(exc_class, exc_value, tb):
# 
# Path: kano/profiling.py
# CONF_FILE = '/etc/kano-profiling.conf'


import os
import sys
import yaml
import cProfile
from kano.logging import logger
from kano.profiling import CONF_FILE

def load_config():
    global conf

    # load the configuration file
    with open(CONF_FILE, 'r') as inp_conf:
        conf = yaml.load(inp_conf)


def has_key(d, k):
    return type(d) is dict and k in d


def declare_timepoint(name, isStart):
    global myProfile
    global point_current
    cmd = None
    pythonProfile = False

    # Check if the app is contained in the profiling conf file
    if has_key(conf, app_name):
        # Check if the timepoint name is contained in the profiling conf file
        if has_key(conf[app_name], name):
            ct = conf[app_name][name]

            # Check if python profiler should be started for this timepoint
            if has_key(ct, 'python'):
                pythonProfile = True
                if isStart:
                    if point_current:

# Path: kano/logging.py
# class lazy_logger:
# class loader:
#     def __getattr__(self, name):
#     def __init__(self, old_mod):
#     def __getattr__(self, name):
# def log_excepthook(exc_class, exc_value, tb):
# 
# Path: kano/profiling.py
# CONF_FILE = '/etc/kano-profiling.conf'


# Path: kano/profiling_late.py
import os
import sys
import yaml
import cProfile
from kano.logging import logger
from kano.profiling import CONF_FILE


def load_config():
    global conf

    # load the configuration file
    with open(CONF_FILE, 'r') as inp_conf:
        conf = yaml.load(inp_conf)


def has_key(d, k):
    return type(d) is dict and k in d


def declare_timepoint(name, isStart):
    global myProfile
    global point_current
    cmd = None
    pythonProfile = False

    # Check if the app is contained in the profiling conf file
    if has_key(conf, app_name):
        # Check if the timepoint name is contained in the profiling conf file
        if has_key(conf[app_name], name):
            ct = conf[app_name][name]

            # Check if python profiler should be started for this timepoint
            if has_key(ct, 'python'):
                pythonProfile = True
                if isStart:
                    if point_current:

                        logger.error(