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 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 Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad 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 Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str Call NameLoad NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body 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 Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad While BoolOpAnd UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr CompareGt AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num If BoolOpAnd CompareGt AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr body AugAssignAdd NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult Num NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call NameLoad NameLoad NameLoad Return 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 ListLoad Assign AttributeStore NameLoad attr NameLoad While CompareLt Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore BinOpMult NameLoad Call NameLoad AttributeLoad NameLoad attr For NameStore SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore NameLoad Assign NameStore ListLoad While BoolOpAnd CompareGt Call NameLoad AttributeLoad NameLoad attr Num CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num AugAssignSub NameStore Num Assert CompareEq BinOpAdd Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad If NameLoad body AugAssignSub AttributeStore NameLoad attr Num Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr BinOpMod Str TupleLoad NameLoad BinOpSub AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpDiv AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore NameLoad While CompareGt AttributeLoad NameLoad attr Num body If BoolOpAnd UnaryOpNot NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore NameLoad 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 Assign NameStore Call NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Print Str NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Num 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  Simulation, changed to asked for multiple tasks in getTask() request.  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 N/A PROBE_RATIO 2 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 N/A N/A N/A N/A logging getLogger sim debug N/A Job %s arrived at %s N/A N/A job id current_time N/A new_events N/A N/A N/A self simulation send_probes 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 N/A N/A N/A N/A logging getLogger sim debug N/A Retuning %s events N/A len new_events N/A new_events N/A N/A ProbeEvent N/A Event N/A N/A  Event to signify a probe arriving at a worker.  __init__ N/A N/A self worker job_id N/A N/A N/A N/A self worker worker N/A N/A self job_id job_id N/A run N/A N/A self current_time N/A N/A N/A N/A N/A N/A self worker add_probe N/A self job_id current_time N/A N/A NoopGetTaskResponseEvent N/A Event N/A N/A  Signifies when a getTask() RPC response arrives at a worker, with a noop response.  __init__ N/A N/A self worker num_tasks N/A N/A N/A N/A self worker worker N/A N/A self num_tasks num_tasks N/A run N/A N/A self current_time N/A N/A N/A N/A N/A N/A N/A logging getLogger sim debug N/A getTask() request for worker %s returned no task at %s N/A N/A N/A self worker id current_time N/A N/A N/A N/A self worker free_slots current_time N/A self num_tasks N/A N/A TaskEndEvent N/A N/A __init__ N/A N/A self worker N/A N/A N/A N/A self worker worker N/A run N/A N/A self current_time N/A N/A N/A N/A N/A N/A self worker free_slots current_time 1 N/A N/A Worker N/A object N/A __init__ N/A N/A self simulation num_slots id N/A N/A N/A N/A self simulation simulation N/A N/A self num_free_slots num_slots N/A N/A self queued_probes N/A N/A Queue Queue N/A N/A self id id N/A N/A self probes_replied_to_immediately 0 N/A add_probe N/A N/A self job_id current_time N/A N/A N/A N/A N/A N/A self queued_probes put job_id N/A new_events N/A N/A self maybe_get_tasks current_time N/A N/A self probes_replied_to_immediately N/A len new_events N/A N/A N/A N/A N/A logging getLogger sim debug N/A Worker %s: %s N/A N/A self id N/A self probes_replied_to_immediately N/A new_events N/A free_slots N/A N/A self current_time num_slots N/A N/A N/A  Frees a slot on the worker and attempts to launch another task in that slot.  N/A N/A self num_free_slots num_slots N/A get_task_events N/A N/A self maybe_get_tasks current_time N/A get_task_events N/A maybe_get_tasks N/A N/A self current_time N/A N/A N/A events N/A N/A N/A N/A N/A N/A N/A self queued_probes empty N/A N/A self num_free_slots 0 N/A N/A N/A self num_free_slots 1 N/A job_id N/A N/A N/A self queued_probes get N/A num_tasks_to_get 1 N/A N/A N/A N/A self num_free_slots 0 N/A N/A N/A self queued_probes empty N/A N/A num_tasks_to_get N/A self num_free_slots N/A N/A self num_free_slots 0 N/A N/A N/A N/A N/A logging getLogger sim debug N/A Num tasks to get: %s num_tasks_to_get N/A task_durations N/A N/A N/A self simulation get_tasks job_id num_tasks_to_get N/A probe_response_time N/A current_time N/A 2 NETWORK_DELAY N/A events N/A N/A task_duration task_durations N/A N/A task_end_time N/A probe_response_time task_duration N/A N/A N/A N/A N/A logging getLogger sim debug N/A Task for job %s running on worker %s (get task at: %s, duration: %s, end: %s) N/A job_id N/A self id current_time task_duration task_end_time N/A N/A N/A N/A self simulation add_task_completion_time job_id task_end_time N/A N/A N/A events append N/A task_end_time N/A TaskEndEvent self N/A N/A N/A len events num_tasks_to_get N/A N/A unfilled_slots N/A num_tasks_to_get N/A len events N/A N/A N/A N/A N/A logging getLogger sim debug N/A Noop returning on worker %s at %s N/A N/A self id probe_response_time N/A N/A N/A events append N/A probe_response_time N/A NoopGetTaskResponseEvent self unfilled_slots N/A events 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 workers N/A N/A N/A self file_prefix file_prefix N/A N/A N/A len N/A self workers TOTAL_WORKERS N/A N/A N/A N/A N/A self workers append N/A Worker self SLOTS_PER_WORKER N/A len N/A self workers N/A N/A self worker_indices N/A range TOTAL_WORKERS N/A N/A self task_distribution task_distribution N/A send_probes N/A N/A self job current_time N/A N/A N/A  Send probes to acquire load information, in order to schedule a job.  N/A N/A N/A self jobs N/A N/A job id job N/A N/A N/A random shuffle N/A self worker_indices N/A probe_events N/A N/A num_probes N/A PROBE_RATIO N/A len N/A job unscheduled_tasks N/A worker_index N/A N/A self worker_indices N/A num_probes N/A N/A N/A N/A probe_events append N/A N/A current_time NETWORK_DELAY N/A ProbeEvent N/A N/A self workers N/A worker_index N/A job id N/A probe_events N/A get_tasks N/A N/A self job_id num_tasks N/A N/A N/A job N/A N/A self jobs N/A job_id N/A remaining_tasks num_tasks N/A task_durations N/A N/A N/A N/A N/A len N/A job unscheduled_tasks 0 N/A remaining_tasks 0 N/A N/A N/A N/A task_durations append 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 remaining_tasks 1 N/A N/A N/A N/A len task_durations remaining_tasks num_tasks N/A task_durations N/A add_task_completion_time N/A N/A self job_id completion_time N/A N/A N/A job_complete N/A N/A N/A N/A self jobs N/A job_id task_completed completion_time N/A job_complete N/A N/A N/A self remaining_jobs 1 N/A N/A N/A N/A N/A logging getLogger sim debug N/A Job %s completed in %s N/A job_id N/A N/A N/A N/A self jobs N/A job_id end_time N/A N/A N/A self jobs N/A job_id start_time N/A run N/A N/A self N/A N/A N/A half_jobs N/A N/A self remaining_jobs 2 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 output_worker_loads False N/A N/A N/A self remaining_jobs 0 N/A N/A N/A N/A output_worker_loads N/A N/A self remaining_jobs half_jobs N/A N/A worker_loads N/A N/A w num_free_slots N/A w N/A self workers N/A N/A plot_cdf worker_loads N/A %s_worker_loads.data N/A self file_prefix N/A output_worker_loads True 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 0 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 tasks_replied_to_immediately N/A sum N/A N/A w probes_replied_to_immediately N/A w N/A self workers N/A Tasks replied to immeiately:  tasks_replied_to_immediately N/A response_times N/A N/A main N/A N/A N/A N/A N/A N/A N/A random seed 1 N/A N/A N/A logging basicConfig level N/A logging INFO N/A sim N/A Simulation 1000 multiget 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