Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults Lambda arguments args NameParam defaults NameLoad body If UnaryOpNot NameLoad body Return Num Assign NameStore BinOpMult BinOpSub Call NameLoad NameLoad Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad NameLoad body Return Call NameLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad Assign NameStore BinOpMult Call NameLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore BinOpMult Call NameLoad SubscriptLoad NameLoad Index Call NameLoad NameLoad BinOpSub NameLoad NameLoad Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str For NameStore Call NameLoad Num body Assign NameStore BinOpDiv NameLoad Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad NameLoad NameLoad Return NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr BinOpDiv BinOpMult BinOpMult Num NameLoad NameLoad NameLoad Print BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMult NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad While BoolOpAnd CompareGt AttributeLoad NameLoad attr Num CompareGt Call NameLoad AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body AugAssignSub AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body AugAssignAdd AttributeStore NameLoad attr Num Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Num While CompareGt AttributeLoad NameLoad attr Num body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assert CompareGtE NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Print BinOpMod Str TupleLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print BinOpMod Str Call NameLoad NameLoad Assign NameStore ListComp BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore NameLoad CompareGt AttributeLoad NameLoad attr Num Print BinOpMod Str Call NameLoad NameLoad Expr Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr Print Str Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Str Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A  Simulates a central scheduler with a complete cluster view.  N/A logging N/A math N/A numpy N/A random N/A Queue util Job TaskDistributions N/A MEDIAN_TASK_DURATION 100 N/A NETWORK_DELAY 0.5 N/A TASKS_PER_JOB 100 N/A SLOTS_PER_WORKER 4 N/A TOTAL_WORKERS 10000 get_percentile N/A N/A N percent key N/A N/A N/A N/A x N/A x N/A N/A N/A N N/A N/A 0 N/A k N/A N/A N/A len N 1 percent N/A f N/A N/A math floor k N/A c N/A N/A math ceil k N/A N/A f c N/A N/A N/A key N/A N N/A N/A int k N/A d0 N/A N/A key N/A N N/A N/A int f N/A c k N/A d1 N/A N/A key N/A N N/A N/A int c N/A k f N/A N/A d0 d1 N/A plot_cdf N/A N/A values filename N/A N/A N/A N/A N/A values sort N/A f N/A open filename w N/A percent N/A range 100 N/A N/A fraction N/A percent 100.0 N/A N/A N/A f write N/A %s	%s
 N/A fraction N/A get_percentile values fraction N/A N/A N/A f close N/A Event N/A object N/A N/A  Abstract class representing events.  __init__ N/A N/A self N/A N/A N/A N/A NotImplementedError Event is an abstract class and cannot be instantiated directly N/A run N/A N/A self current_time N/A N/A N/A  Returns any events that should be added to the queue.  N/A N/A NotImplementedError The run() method must be implemented by each class subclassing Event N/A N/A JobArrival N/A Event N/A N/A  Event to signify a job arriving at a scheduler.  __init__ N/A N/A self simulation interarrival_delay task_distribution N/A N/A N/A N/A self simulation simulation N/A N/A self interarrival_delay interarrival_delay N/A N/A self task_distribution task_distribution N/A run N/A N/A self current_time N/A N/A N/A job N/A Job TASKS_PER_JOB current_time N/A self task_distribution MEDIAN_TASK_DURATION N/A new_events N/A N/A N/A self simulation schedule_tasks job current_time N/A arrival_delay N/A N/A random expovariate N/A 1.0 N/A self interarrival_delay N/A N/A N/A new_events append N/A N/A current_time arrival_delay self N/A new_events N/A N/A TaskEndEvent N/A N/A N/A  This event is used to signal to the scheduler that a slot is free (so should include
    the RTT to notify the scheduler).  __init__ N/A N/A self simulation N/A N/A N/A N/A self simulation simulation N/A run N/A N/A self current_time N/A N/A N/A N/A N/A N/A self simulation free_slot current_time N/A N/A Simulation N/A object N/A __init__ N/A N/A self num_jobs file_prefix load task_distribution N/A N/A N/A avg_used_slots N/A N/A load SLOTS_PER_WORKER TOTAL_WORKERS N/A N/A self interarrival_delay N/A N/A N/A 1.0 MEDIAN_TASK_DURATION TASKS_PER_JOB avg_used_slots N/A N/A Interarrival delay: %s (avg slots in use: %s) N/A N/A self interarrival_delay avg_used_slots N/A N/A self jobs N/A N/A N/A self remaining_jobs num_jobs N/A N/A self event_queue N/A N/A Queue PriorityQueue N/A N/A self num_free_slots N/A TOTAL_WORKERS SLOTS_PER_WORKER N/A N/A self unscheduled_jobs N/A N/A N/A self file_prefix file_prefix N/A N/A self task_distribution task_distribution N/A schedule_tasks N/A N/A self job current_time N/A N/A N/A N/A N/A self jobs N/A N/A job id job N/A N/A N/A N/A self unscheduled_jobs append job N/A N/A N/A self maybe_launch_tasks current_time N/A maybe_launch_tasks N/A N/A self current_time N/A N/A N/A task_end_events N/A N/A N/A N/A N/A self num_free_slots 0 N/A N/A len N/A self unscheduled_jobs 0 N/A N/A N/A self num_free_slots 1 N/A job N/A N/A self unscheduled_jobs N/A 0 N/A task_duration N/A N/A job unscheduled_tasks N/A 0 N/A N/A job unscheduled_tasks N/A N/A job unscheduled_tasks N/A 1 N/A N/A N/A len N/A job unscheduled_tasks 0 N/A N/A N/A N/A logging info N/A Finished scheduling tasks for job %s N/A job id N/A task_end_time N/A N/A current_time task_duration NETWORK_DELAY N/A scheduler_notify_time N/A task_end_time NETWORK_DELAY N/A N/A N/A task_end_events append N/A scheduler_notify_time N/A TaskEndEvent self N/A job_complete N/A N/A job task_completed task_end_time N/A job_complete N/A N/A N/A self remaining_jobs 1 N/A N/A self unscheduled_jobs N/A N/A self unscheduled_jobs N/A 1 N/A task_end_events N/A free_slot N/A N/A self current_time N/A N/A N/A N/A self num_free_slots 1 N/A N/A N/A self maybe_launch_tasks current_time N/A run N/A N/A self N/A N/A N/A N/A N/A N/A self event_queue put N/A 0 N/A JobArrival self N/A self interarrival_delay N/A self task_distribution N/A last_time 0 N/A N/A N/A self remaining_jobs 0 N/A N/A N/A current_time event N/A N/A N/A self event_queue get N/A N/A current_time last_time N/A last_time current_time N/A new_events N/A N/A event run current_time N/A new_event new_events N/A N/A N/A N/A N/A self event_queue put new_event N/A N/A Simulation ended after %s milliseconds (%s jobs started) N/A last_time N/A len N/A self jobs N/A complete_jobs N/A j N/A j N/A N/A N/A self jobs values N/A N/A j completed_tasks_count N/A j num_tasks N/A N/A %s complete jobs N/A len complete_jobs N/A response_times N/A N/A N/A job end_time N/A job start_time N/A job complete_jobs N/A N/A job start_time 500 N/A N/A Included %s jobs N/A len response_times N/A N/A plot_cdf response_times N/A %s_response_times.data N/A self file_prefix N/A Average response time:  N/A N/A numpy mean response_times N/A longest_tasks N/A N/A job longest_task N/A job complete_jobs N/A N/A plot_cdf longest_tasks N/A %s_ideal_response_time.data N/A self file_prefix N/A response_times N/A N/A main N/A N/A N/A N/A N/A N/A N/A logging basicConfig level N/A logging INFO N/A sim N/A Simulation 100000 centralized 0.95 N/A TaskDistributions CONSTANT N/A N/A N/A sim run N/A N/A N/A __name__ __main__ N/A N/A N/A main