Example #1
0
def run(num_sets, num_tasks, utilization, percent, soft_contrib, duration, cpu_count):
    # Create taskset
    tset = create(num_sets, num_tasks, utilization)
    cbs_res = None
    edf_res = None
    for tasks in tset:
        config = default_config(duration, cpu_count)
        add(config, tasks, percent, soft_contrib)

        config_cbs(config)
        cbs_res = analysis.merge(analysis.analysis(run_model(config)), cbs_res)

        config_edf(config)
        edf_res = analysis.merge(analysis.analysis(run_model(config)), edf_res)


    return analysis.division(cbs_res, len(tset)), analysis.division(edf_res, len(tset))
Example #2
0
def build(args, source, output):
    rules = {
        '*.tga': TextureFormat.convert_to(args.texFormat),
        '*.png': TextureFormat.convert_to(args.texFormat),
        '*.fbx': actions.convert_fbx
    }

    queue = tasks.create(args.workers)
    outdated = files.find_outdated(source)

    files.build(queue, outdated, output, rules)

    queue.start()

    # Write the manifest file
    with open(os.path.join(output, 'assets.json'), 'wt') as fh:
        fh.write(files.generate_manifest(outdated))
        fh.close()
Example #3
0
def set(response, request, params):
    if len(params) >= 5:
        item = params[3]
        action = params[4]
        response.data = {"success": False}
        if item == "board":
            if action == "new":
                response.data = boards.create(request.POST)
            elif action == "update":
                response.data = boards.update(request.POST)
            elif action == "delete":
                response.data = boards.remove(request.POST)
        elif item == "category":
            if action == "new":
                response.data = categories.create(request.POST)
            elif action == "update":
                response.data = categories.update(request.POST)
            elif action == "delete":
                response.data = categories.remove(request.POST)
            elif action == "order":
                response.data = categories.setOrder(request.POST)
        elif item == "task":
            if action == "new":
                response.data = tasks.create(request.POST)
            elif action == "update":
                response.data = tasks.update(request.POST)
            elif action == "delete":
                response.data = tasks.remove(request.POST)
            elif action == "order":
                response.data = tasks.setOrder(request.POST)
        elif item == "user":
            if action == "new":
                response.data = users.create(request.POST)
            elif action == "update":
                response.setOk()
                response.msg = "set update user"
            elif action == "delete":
                response.setOk()
                response.msg = "set delete user"
        response.setOk() if response.data["success"] is True else response.setInvalid()
    else:
        response.setMoreInfo()
    return response
Example #4
0
 def OnTasklistButton(self, event):
     tasksDialog = tasks.create(self)
     tasksDialog.Show()
Example #5
0
 def OnTaskMenuItem(self, event):
     taskDlg = tasks.create(self)
     taskDlg.Show()
Example #6
0
 def OnTasklistButton(self, event):
     tasksDialog = tasks.create(self)
     tasksDialog.Show()