|
43 | 43 | :max-value-length 10000 ; To avoid printing huge graphs and Exceptions. |
44 | 44 | :max-coll-size 5 |
45 | 45 | :max-nested-depth nil |
46 | | - :show-analytics-hint nil |
47 | | - :analytics-size-cutoff 100000}) |
| 46 | + :display-analytics-hint nil |
| 47 | + :analytics-size-cutoff 100000}) |
48 | 48 |
|
49 | 49 | (defn- reset-render-state [inspector] |
50 | 50 | (-> inspector |
|
210 | 210 | (sibling* inspector 1)) |
211 | 211 |
|
212 | 212 | (defn- validate-config [{:keys [page-size max-atom-length max-value-length |
213 | | - max-coll-size max-nested-depth show-analytics-hint |
| 213 | + max-coll-size max-nested-depth display-analytics-hint |
214 | 214 | analytics-size-cutoff] |
215 | 215 | :as config}] |
216 | 216 | (when (some? page-size) (pre-ex (pos-int? page-size))) |
217 | 217 | (when (some? max-atom-length) (pre-ex (pos-int? max-atom-length))) |
218 | 218 | (when (some? max-value-length) (pre-ex (pos-int? max-value-length))) |
219 | 219 | (when (some? max-coll-size) (pre-ex (pos-int? max-coll-size))) |
220 | 220 | (when (some? max-nested-depth) (pre-ex (pos-int? max-nested-depth))) |
221 | | - (when (some? show-analytics-hint) (pre-ex (= show-analytics-hint "true"))) |
| 221 | + (when (some? display-analytics-hint) (pre-ex (= display-analytics-hint "true"))) |
222 | 222 | (when (some? analytics-size-cutoff) (pre-ex (pos-int? analytics-size-cutoff))) |
223 | 223 | (select-keys config (keys default-inspector-config))) |
224 | 224 |
|
|
265 | 265 | (pre-ex (contains? supported-view-modes mode)) |
266 | 266 | (inspect-render (assoc inspector :view-mode mode))) |
267 | 267 |
|
268 | | -(defn show-analytics |
| 268 | +(defn display-analytics |
269 | 269 | "Calculates and renders analytics for the current object." |
270 | 270 | [{:keys [analytics-size-cutoff value] :as inspector}] |
271 | 271 | (inspect-render |
|
274 | 274 | (assoc :value-analysis |
275 | 275 | (binding [analytics/*size-cutoff* analytics-size-cutoff] |
276 | 276 | (analytics/analytics value))) |
277 | | - (dissoc :show-analytics-hint)) |
| 277 | + (dissoc :display-analytics-hint)) |
278 | 278 | inspector))) |
279 | 279 |
|
280 | 280 | (defn render-onto [inspector coll] |
|
508 | 508 | inspector)) |
509 | 509 |
|
510 | 510 | (defn- render-analytics |
511 | | - [{:keys [show-analytics-hint value-analysis] :as inspector}] |
512 | | - (if (or value-analysis show-analytics-hint) |
| 511 | + [{:keys [display-analytics-hint value-analysis] :as inspector}] |
| 512 | + (if (or value-analysis display-analytics-hint) |
513 | 513 | (as-> inspector ins |
514 | 514 | (render-section-header ins "Analytics") |
515 | 515 | (indent ins) |
516 | 516 | (if value-analysis |
517 | 517 | (render-value-maybe-expand ins value-analysis) |
518 | 518 | (-> ins |
519 | 519 | (render-indent) |
520 | | - (render-ln "Press 'y' or M-x cider-inspector-show-analytics to analyze this value."))) |
| 520 | + (render-ln "Press 'y' or M-x cider-inspector-display-analytics to analyze this value."))) |
521 | 521 | (unindent ins)) |
522 | 522 | inspector)) |
523 | 523 |
|
|
0 commit comments