diff --git a/if we just want to draw a pie chart.rs b/if we just want to draw a pie chart.rs new file mode 100644 index 0000000000..1edfdd53bf --- /dev/null +++ b/if we just want to draw a pie chart.rs @@ -0,0 +1,35 @@ +// If we just want to draw a pie chart of where latency goes, +// then we can project the `if we want to draw a jaeger trace.rs` into these structures. +// - fold `Vec<...>` into a sum +// - fold `start_time` and `end_time` into deltas + +struct SmgrLatencyRecorder { + parse_request: u64, + downstairs: Arc>, + flush_response: u64, +} + +struct Downstairs { + wait_for_execution: u64, // batching happens here + execution: Arc>, +} + +struct Execution { + traverse_and_submit: Plan, + wait_for_io_completions_and_walredo: WaitForIoCompletionsAndWalredo, +} + +struct Plan { + visit_layer: VisitLayer, + // implict remainder: time in the fringe code and traversing timeline ancestor graph +} + +struct VisitLayer { + index_lookup: u64, + submit_io: u64, +} + +struct WaitForIoCompletionsAndWalredo { + wait_for_io_completions: u64, + walredo: u64, +} diff --git a/if we want to draw a jaeger trace.rs b/if we want to draw a jaeger trace.rs new file mode 100644 index 0000000000..ec0e55f75f --- /dev/null +++ b/if we want to draw a jaeger trace.rs @@ -0,0 +1,69 @@ +// If we want to draw a Jaeger trace + +struct SmgrLatencyRecorder { + start_time: Instant, + parse_request: ParseRequest, + downstairs: Arc>, + flush_response: FlushResponse, + end_time: Instant, +} + +struct ParseRequest { + start_time: Instant, + end_time: Instant, +} + +struct FlushResponse { + start_time: Instant, + end_time: Instant, +} + +struct Downstairs { + start_time: Instant, + wait_for_execution: WaitForExecution, // batching happens here + execution: Arc>, + end_time: Instant, +} + +enum WaitForExecution { + start_time: Instant, + end_time: Instant, +} + +struct Execution { + start_time: Instant, + traverse_and_submit: Plan, + wait_for_io_completions_and_walredo: Vec>>, + end_time: Instant, +} + +struct Plan { + start_time: Instant, + visit_layer: Vec, + // implict remainder: time in the fringe code and traversing timeline ancestor graph + end_time: Instant, +} + +struct VisitLayer { + start_time: Instant, + index_lookup: IndexLookup, + submit_io: SubmitIo, + end_time: Instant, +} + +struct IndexLookup { + start_time: Instant, + end_time: Instant, +} + +struct SubmitIo { + start_time: Instant, + end_time: Instant, +} + +struct WaitForIoCompletionsAndWalredo { + start_time: Instant, + wait_for_io_completions: u64, + walredo: u64, + end_time: Instant, +}