anchor.diff:              end,
       system_log:info("Size, PerNode, Size2, Offset, NumNodes: ~p, ~p, ~p, ~p, ~p",
           [Size, PerNode, Size2, Offset, NumNodes]),
  -    Worker = mzbl_script:extract_worker(PoolOpts),
  -    Self = self(),
  -
  -    load_worker(Worker),
  -
  -    Numbers = lists:seq(0, mzb_utility:int_ceil((Size2 - Offset + 1)/NumNodes) - 1),
  -    system_log:info("Worker offsets: ~p", [Numbers]),
  -
  -    WorkerStarter =
  -        erlang:spawn_monitor(fun () ->
  -            Node = node(),
  -            StartTime = msnow(),
  -            lists:foreach(fun(N) ->
  -                            worker_start_delay(StartDelay, NumNodes, N, StartTime),
  -                            WId = N * NumNodes + Offset,
  -                            WorkerScript = mzbl_ast:add_meta(Script, [{worker_id, WId}, {pool_size, Size2}]),
  -                            gen_server:cast(Self, {start_worker, WorkerScript, Env, Worker, Node, WId, Size2})
  -                        end, Numbers)
  -        end),
  -    State#s{name = Name, worker_starter = WorkerStarter}.
  +
  +    Script2 = mzbl_ast:add_meta(Script, [{pool_size, Size2}]),
  +    {Script2, mzb_utility:int_ceil((Size2 - Offset + 1)/NumNodes), StartDelay}.
  +
  +kill_some_workers(N, Tid) ->
  +    Pids = fun F (0, _, Acc) -> lists:reverse(Acc);
  +               F (_, '$end_of_table', Acc) -> lists:reverse(Acc);
  +               F (K, Pid, Acc) -> F(K - 1, ets:next(Tid, Pid), [Pid | Acc])
  +           end (N, ets:first(Tid), []),
  +    [exit(P, kill) || P <- Pids].
   
   load_worker({WorkerProvider, Worker}) ->
       case erlang:apply(WorkerProvider, load, [Worker]) of
  
positive.code: %%%===================================================================
  
  start_workers(Pool, Env, NumNodes, Offset, #s{} = State) ->
      #operation{name = pool, args = [PoolOpts, Script], meta = Meta} = Pool,
      Eval = fun (E) -> mzbl_interpreter:eval_std(E, Env) end,
      Name = proplists:get_value(pool_name, Meta),
      [Size] = Eval(mzbl_ast:find_operation_and_extract_args(size, PoolOpts, [undefined])),
      [PerNode] = Eval(mzbl_ast:find_operation_and_extract_args(per_node, PoolOpts, [undefined])),
      StartDelay = case mzbl_ast:find_operation_and_extract_args(worker_start, PoolOpts, [undefined]) of
  
negative.code: 
  -include_lib("mzbench_language/include/mzbl_types.hrl").
  
  -define(POLLVARS_INTERVAL_MS, 1000).
  
  -record(s, {
      workers  = [] :: ets:tid(),
      succeed  = 0 :: non_neg_integer(),
      failed   = 0 :: non_neg_integer(),
      name     = undefined :: string(),
      worker_starter = undefined :: undefined | {pid(), reference()},
      current_pool_size = 0 :: non_neg_integer(),
      worker_starter_fun = undefined :: fun(),
      workers_num_fun = undefined :: fun(),
      poll_vars_timer = undefined :: reference()
  }).
  
  %%%===================================================================
  