File tree Expand file tree Collapse file tree 6 files changed +18
-14
lines changed
src-inst/flow_storm/runtime Expand file tree Collapse file tree 6 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 824824 (-> entry
825825 index-api/as-immutable
826826 (ensure-indexes i)
827- (assoc :flow-id (index-protos/flow-id tl i )
827+ (assoc :flow-id (index-protos/flow-id tl)
828828 :thread-id (index-protos/thread-id tl i))
829829 reference-timeline-entry!)
830830 (recur (next-fn i))))))))
Original file line number Diff line number Diff line change 723723 (if backward?
724724 (dec (count timeline))
725725 0 ))
726- flow-id (index-protos/flow-id timeline curr-idx )
726+ flow-id (index-protos/flow-id timeline)
727727 thread-id (index-protos/thread-id timeline curr-idx)
728728 to-idx (if backward?
729729 (max (- curr-idx batch-size) 0 )
11291129 [x]
11301130 (fn-return-trace/fn-end-trace? x))
11311131
1132+ (defn timeline-flow-id
1133+ " Given a timeline returns its flow-id"
1134+ [timeline]
1135+ (index-protos/flow-id timeline))
1136+
11321137(defn timeline-thread-id
11331138 " Given a timeline and a idx, returns the thread-id associated to the entry.
11341139 On single thread timelines all index are going to return the same thread-id, which
11351140 is not the case for total order timelines."
11361141 [timeline idx]
11371142 (index-protos/thread-id timeline idx))
1143+
1144+
Original file line number Diff line number Diff line change 1515 (reset-build-stack [_]))
1616
1717(defprotocol TimelineP
18- (flow-id [_ idx ])
18+ (flow-id [_])
1919 (thread-id [_ idx]))
2020
2121(defprotocol TimelineEntryP
Original file line number Diff line number Diff line change 5151
5252 (register-thread-indexes [this flow-id thread-id thread-name form-id indexes]
5353 (when-not (index-protos/flow-exists? this flow-id)
54- (swap! total-order-timelines assoc flow-id (total-order-timeline/make-total-order-timeline )))
54+ (swap! total-order-timelines assoc flow-id (total-order-timeline/make-total-order-timeline flow-id )))
5555
5656 (swap! registry update flow-id
5757 (fn [threads]
Original file line number Diff line number Diff line change 4646
4747(defn- print-it [timeline]
4848 (utils/format " #flow-storm/timeline [flow-id: %d thread-id: %d count: %d]"
49- (index-protos/flow-id timeline 0 )
49+ (index-protos/flow-id timeline)
5050 (index-protos/thread-id timeline 0 )
5151 (count timeline)))
5252
7878 ]
7979
8080 index-protos /TimelineP
81- (flow-id [_ _ ] flow-id)
81+ (flow-id [_] flow-id)
8282 (thread-id [_ _] tid)
8383
8484 index-protos /ThreadTimelineRecorderP
Original file line number Diff line number Diff line change 4242 (defmethod print-method TotalOrderTimelineEntry [tote ^java.io.Writer w]
4343 (.write w ^String (print-tote tote))))
4444
45- (deftype TotalOrderTimeline [mt-timeline]
45+ (deftype TotalOrderTimeline [flow-id mt-timeline]
4646
4747 index-protos /TimelineP
4848
49- (flow-id [this idx]
50- (locking this
51- (let [tote (ml-get mt-timeline idx)
52- th-tl (index-protos/tote-thread-timeline tote)]
53- (index-protos/flow-id th-tl 0 ))))
49+ (flow-id [_]
50+ flow-id)
5451
5552 (thread-id [this idx]
5653 (locking this
121118 (-nth [_ n] (ml-get mt-timeline n))
122119 (-nth [_ n not-found] (or (ml-get mt-timeline n) not-found))]))
123120
124- (defn make-total-order-timeline []
125- (TotalOrderTimeline. (make-mutable-list )))
121+ (defn make-total-order-timeline [flow-id ]
122+ (TotalOrderTimeline. flow-id (make-mutable-list )))
126123
127124(defn make-detailed-timeline-mapper [forms-registry]
128125 (let [threads-stacks (atom {})]
You can’t perform that action at this time.
0 commit comments