# Path: ceagle/api_fake_data/base.py
# CONF = config.CONF
# def route(reg):
#     def decorator(method):
#     def __init__(self, name, endpoint):
#     def _setup_routing(self):
#     def _find_route(self, path):
#     def default(self, path, *args, **kwargs):
#     def get(self, path, **kwargs):
# def api_handler(fake):
#     def real_function_handler(real):
#         def choice_maker(*args, **kwargs):
# def randnum(from_num, to_num, round_by=2):
# class FakeClient(object):
# 
# Path: ceagle/api_fake_data/fake_regions.py
# REGIONS_NUM = 4
# def regions(detailed=False):
# def get_regions(detailed):


import datetime
import random
import flask
from ceagle.api_fake_data import base
from ceagle.api_fake_data import fake_regions

        fci_data = generate_values(period, 1, null_probability)[0]
        time_data = generate_values(period, 1, null_probability)[0]
        size_data = generate_values(
            period, 50, null_probability, integer=True)[0]
        count_data = generate_values(
            period, 50, null_probability, integer=True)[0]
        return {
            "fci": random.randint(0, 100) * 0.01,
            "response_time": base.randnum(.1, 2.5),
            "response_size": random.randint(2000, 5000),
            "api_calls_count": random.randint(200, 500),
            "fci_data": fci_data,
            "response_time_data": time_data,
            "response_size_data": size_data,
            "api_calls_count_data": count_data
        }

    elif service == "performance":
        null_probability = null_allowed and PERFORMANCE_NULL_PROBABILITY or 0
        data, avg = generate_values(period, 1, null_probability)
        return {"data": data, "duration": avg}

    elif service == "availability":
        null_probability = null_allowed and AVAILABILITY_NULL_PROBABILITY or 0
        data, avg = generate_values(period, 1, null_probability)
        return {"availability_data": data, "availability": avg}


def generate_region_data(region, period, service, null_allowed):

# Path: ceagle/api_fake_data/base.py
# CONF = config.CONF
# def route(reg):
#     def decorator(method):
#     def __init__(self, name, endpoint):
#     def _setup_routing(self):
#     def _find_route(self, path):
#     def default(self, path, *args, **kwargs):
#     def get(self, path, **kwargs):
# def api_handler(fake):
#     def real_function_handler(real):
#         def choice_maker(*args, **kwargs):
# def randnum(from_num, to_num, round_by=2):
# class FakeClient(object):
# 
# Path: ceagle/api_fake_data/fake_regions.py
# REGIONS_NUM = 4
# def regions(detailed=False):
# def get_regions(detailed):


# Path: ceagle/api_fake_data/fake_status.py
import datetime
import random
import flask
from ceagle.api_fake_data import base
from ceagle.api_fake_data import fake_regions


        fci_data = generate_values(period, 1, null_probability)[0]
        time_data = generate_values(period, 1, null_probability)[0]
        size_data = generate_values(
            period, 50, null_probability, integer=True)[0]
        count_data = generate_values(
            period, 50, null_probability, integer=True)[0]
        return {
            "fci": random.randint(0, 100) * 0.01,
            "response_time": base.randnum(.1, 2.5),
            "response_size": random.randint(2000, 5000),
            "api_calls_count": random.randint(200, 500),
            "fci_data": fci_data,
            "response_time_data": time_data,
            "response_size_data": size_data,
            "api_calls_count_data": count_data
        }

    elif service == "performance":
        null_probability = null_allowed and PERFORMANCE_NULL_PROBABILITY or 0
        data, avg = generate_values(period, 1, null_probability)
        return {"data": data, "duration": avg}

    elif service == "availability":
        null_probability = null_allowed and AVAILABILITY_NULL_PROBABILITY or 0
        data, avg = generate_values(period, 1, null_probability)
        return {"availability_data": data, "availability": avg}


def generate_region_data(region, period, service, null_allowed):

    data = fake_regions.regions(detailed=True).get(region)