 
 
 
-(defn get-segment-metrics 
+(defn- get-segment-metrics 
   "Get metrics based on segments"
   []
   (let [segments (db/select 'Segment)]
     {:segments (count segments)}))
 
 
-(defn get-metric-metrics 
+(defn- get-metric-metrics 
   "Get metrics based on metrics"
   []
   (let [metrics (db/select 'Metric)]
     {:metrics (count metrics)}))
 
-(defn bin-latencies 
+(defn- bin-latencies 
   "Bin latencies, which are in milliseconds"
   [query-executions]
   (let [latency-vals (map #(/ %1 1000) (map :running_time query-executions))]
     (frequencies (map bin-large-number latency-vals))))
 
 ;; Execution Metrics
-(defn get-execution-metrics 
+(defn- get-execution-metrics 
   "Get metrics based on executions. 
   This should be done in a single pass, as there might 
   be a LOT of query executions in a normal instance

    (> x 10000) "10000+")
  )

(defn get-value-frequencies 
  "go through a bunch of maps and count the frequency a given key's values"
  [many-maps k]
  (frequencies (map k many-maps))
  )

(defn histogram 
  "Bin some frequencies using a passed in binning function"
  [binning-fn many-maps k]
  (frequencies (map binning-fn (vals (get-value-frequencies many-maps k))))

  )


(defn- bin-large-number 
  "Return large bin number. Assumes positive inputs"
  [x]
  (cond
