 (defn create-benchmark
  "Create a new Benchmark record. This encapsulates the full benchmark state"
  [client url worker-count max-runs worker-fn]
- (let [recorder (create-recorder)
+ (let [recorder (rec/create-recorder)
        benchmark (Benchmark. (atom :initialized)
                              client
                              url

    (on-success res-ch (fn [[result next-result]]
     (let [{:keys [worker-id]} result]
       (when (check-result-recordability? this)
         (record-result recorder worker-id result)))
     (handle-result this next-result)))
    (on-error res-ch (fn [[result next-result]]
      (let [{:keys [worker-id error]} result]
        (log/warn error (str "Error received from worker" worker-id))
        (when (check-result-recordability? this)
          (record-error recorder worker-id error))
        (handle-result this next-result)))))
  
  (broadcast-state [this]

    (if (not (compare-and-set! state :initialized :started))
      (io! (log/warn (str "Could not start from: @state")))
      (do
        (rec/record-start recorder)
        (doseq [worker @workers]
          (if-let [res-ch (wrkr/work worker)]
            (handle-result this res-ch)))
        (compare-and-set! broadcast-task nil
                          (broadcast-at-interval this 200)))))
