          :or {pdb-host "127.0.0.1" pdb-port 8080}} (:jetty config)
         base-url (utils/pdb-cmd-base-url pdb-host pdb-port :v1)
         ;; Create an agent for each host
-        get-random-entity (fn [host entities]
-                            (some-> entities
-                                    rand-nth
-                                    (assoc "certname" host)))
-        make-host (fn [i]
-                    (let [host (str "host-" i)]
-                      {:host host
-                       :catalog (when-let [catalog (get-random-entity host catalogs)]
-                                  (update catalog "resources" (partial map #(update % "tags" conj pdb-host))))
-                       :report (get-random-entity host reports)
-                       :factset (get-random-entity host facts)}))
-        hosts (map make-host (range numhosts))
         command-send-ch (if nummsgs
                           (chan)
                           (chan (dropping-buffer 10000)))

          (<! message-timeout)
          (recur))))))

(defn benchmark-main
  [& args]
  (let [{:keys [config rand-perc numhosts nummsgs threads] :as options} (validate-cli! args)

            [puppetlabs.puppetdb.cheshire :as json]
            [me.raynes.fs :as fs]
            [clojure.java.io :as io]
            [puppetlabs.puppetdb.utils :as utils :refer [println-err]]
            [puppetlabs.kitchensink.core :as kitchensink]
            [clj-time.core :as time]
            [puppetlabs.puppetdb.client :as client]
