   (int (/ (apply + numbers) (count numbers))))
 
 (defn- issue-timed-request
-  "Issue a timed request to a url within a future after sleeping the future for a specified amount
-  of time. Then pass the elapsed time and the content of the request through the `handler` to get
-  a vector of timing results - where each member of the vector represents one category timing."
-  [url pause handler]
+  "Issue a timed request by invoking request-invoker within a future after sleeping the future for a
+  specified amount of time. Then pass the elapsed time and the content of the request through the
+  `handler` to get a vector of timing results - where each member of the vector represents one
+  category timing."
+  [request-invoker pause handler]
   (future (let [slept (Thread/sleep pause)
                 start (System/nanoTime)
-                content (client/get url)
+                content (request-invoker)
                 stop (System/nanoTime)
                 elapsed-time-in-ms (int (/ (- stop start) 1000000))]
             (handler elapsed-time-in-ms content))))
 
 (defn- load-test-url
-  "Execute number-of-requests requests against the url with a pause-between-requests pause between
+  "Execute number-of-requests requests using the request-invoker with a pause-between-requests pause between
   them. This execution happens in futures so that if we're simulating a decent amount of load that
   load should be able to happen in parallel.
   

  member represents one timing category from the request. So, if you're querying a JSON API that
  surfaces a bit of timing information in the response, you might query that JSON and generate a
  vector from the information you find there in your handler."
  [url number-of-requests pause-between-requests handler]
  (let [request-indicies (range number-of-requests)
        request-delays (map #(* % pause-between-requests) request-indicies)
        request-futures (map #(issue-timed-request url % handler) request-delays)
        result-timings (map #(deref %) request-futures)
        grouped-result-categories (partition (count result-timings) (apply interleave result-timings))
        average-timing-per-category (map #(-> % (average) (str "ms")) grouped-result-categories)]

                                                    nil])]
        (println (str "Running a load test of " url))
        (println (str requests " requests spread over " seconds " seconds."))
        (if verbose (println (str "Request options: " request-options)))
        (if custom-handler-name (println (str "Using custom handler: " custom-handler-name)))
        (println "")
        (load-test-url request-invoker requests pause-between-requests parsed-handler)
        (System/exit 0)))))
