Skip to content

Commit

Permalink
Rename find-fn-frames-light to find-fn-frames and make form-id param …
Browse files Browse the repository at this point in the history
…optional
  • Loading branch information
jpmonettas committed Jan 27, 2024
1 parent 2e1496c commit 9231737
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src-dbg/flow_storm/debugger/runtime_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(callstack-node-childs [_ node])
(callstack-node-frame [_ node])
(fn-call-stats [_ flow-id thread-id])
(find-fn-frames-light [_ flow-id thread-id fn-ns fn-name form-id])
(find-fn-frames [_ flow-id thread-id fn-ns fn-name form-id])
(find-timeline-entry [_ criteria])
(total-order-timeline [_])
(thread-prints [_ print-cfg])
Expand Down Expand Up @@ -156,7 +156,7 @@
(callstack-node-childs [_ node] (api-call :local "callstack-node-childs" [node]))
(callstack-node-frame [_ node] (api-call :local "callstack-node-frame" [node]))
(fn-call-stats [_ flow-id thread-id] (api-call :local "fn-call-stats" [flow-id thread-id]))
(find-fn-frames-light [_ flow-id thread-id fn-ns fn-name form-id] (api-call :local "find-fn-frames-light" [flow-id thread-id fn-ns fn-name form-id]))
(find-fn-frames [_ flow-id thread-id fn-ns fn-name form-id] (api-call :local "find-fn-frames" [flow-id thread-id fn-ns fn-name form-id]))
(find-timeline-entry [_ criteria] (api-call :local "find-timeline-entry" [criteria]))
(total-order-timeline [_] (api-call :local "total-order-timeline" []))
(thread-prints [_ print-cfg] (api-call :local "thread-prints" [print-cfg]))
Expand Down Expand Up @@ -279,7 +279,7 @@
(callstack-node-childs [_ node] (api-call :remote "callstack-node-childs" [node]))
(callstack-node-frame [_ node] (api-call :remote "callstack-node-frame" [node]))
(fn-call-stats [_ flow-id thread-id] (api-call :remote "fn-call-stats" [flow-id thread-id]))
(find-fn-frames-light [_ flow-id thread-id fn-ns fn-name form-id] (api-call :remote "find-fn-frames-light" [flow-id thread-id fn-ns fn-name form-id]))
(find-fn-frames [_ flow-id thread-id fn-ns fn-name form-id] (api-call :remote "find-fn-frames" [flow-id thread-id fn-ns fn-name form-id]))
(find-timeline-entry [_ criteria] (api-call :remote "find-timeline-entry" [criteria]))
(total-order-timeline [_] (api-call :remote "total-order-timeline" []))
(thread-prints [_ print-cfg] (api-call :remote "thread-prints" [print-cfg]))
Expand Down
2 changes: 1 addition & 1 deletion src-dbg/flow_storm/debugger/ui/flows/functions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
(defn- show-function-calls [flow-id thread-id selected-items]
(let [{:keys [form-id fn-ns fn-name]} (first selected-items)
[{:keys [clear add-all]}] (obj-lookup flow-id thread-id "function_calls_list")
fn-call-traces (runtime-api/find-fn-frames-light rt-api flow-id thread-id fn-ns fn-name form-id)]
fn-call-traces (runtime-api/find-fn-frames rt-api flow-id thread-id fn-ns fn-name form-id)]
(clear)
(add-all fn-call-traces)))

Expand Down
6 changes: 2 additions & 4 deletions src-inst/flow_storm/runtime/debuggers_api.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@
{}
(index-api/all-threads)))

(def find-fn-frames index-api/find-fn-frames)

(defn find-fn-frames-light [flow-id thread-id fn-ns fn-name form-id]
(defn find-fn-frames [flow-id thread-id fn-ns fn-name form-id]
(let [fn-frames (index-api/find-fn-frames flow-id thread-id fn-ns fn-name form-id)
frames (into [] (map reference-frame-data!) fn-frames)]
frames))
Expand Down Expand Up @@ -449,7 +447,7 @@
:callstack-node-childs callstack-node-childs
:callstack-node-frame callstack-node-frame
:fn-call-stats fn-call-stats
:find-fn-frames-light find-fn-frames-light
:find-fn-frames find-fn-frames
:find-timeline-entry find-timeline-entry
:total-order-timeline total-order-timeline
:thread-prints thread-prints
Expand Down
6 changes: 3 additions & 3 deletions src-inst/flow_storm/runtime/indexes/api.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@
nil
nil
(fn [fns fname formid _]
(and (= form-id formid)
(= fn-name fname)
(= fn-ns fns))))))
(and (if form-id (= form-id formid) true)
(if fn-name (= fn-name fname) true)
(if fn-ns (= fn-ns fns) true))))))


(defn discard-flow [flow-id]
Expand Down

0 comments on commit 9231737

Please sign in to comment.