                                                requests
                                                pause-between-requests
                                                parsed-handler)]
+          (if csv
+            (with-open [csv-writer (io/writer csv)]
+              (let [raw-results (get load-test-results "RawResults")
+                    lines (map #(join "," %) raw-results)
+                    content (join "\n" lines)]
+                (println (str "Writing CSV " csv))
+                (.write csv-writer content))))
           (println (str "Average: " (get load-test-results "Averages")))
           (println (str "Minimum: " (get load-test-results "Minimums")))
           (println (str "Maximum: " (get load-test-results "Maximums")))

             http-method :method
             http-headers :headers
             http-body :body
             verbose :verbose} (:options parsed-options)
            [url] (:arguments parsed-options)
            milliseconds (* seconds 1000)
            pause-between-requests (/ milliseconds requests)

    {"Averages" average-per-category
     "Minimums" min-per-category
     "Maximums" max-per-category
     "StandardDeviations" stddev-per-category
     "RawResults" results}))

(defn- select-function-for-http-method
 [http-method]
