MCPcopy Create free account
hub / github.com/apache/datafusion / append

Method append

test-utils/src/data_gen.rs:106–130  ·  view source on GitHub ↗
(&mut self, rng: &mut StdRng, host: &str, service: &str)

Source from the content-addressed store, hash-verified

104 }
105
106 fn append(&mut self, rng: &mut StdRng, host: &str, service: &str) {
107 let num_pods = rng.random_range(self.options.pods_per_host.clone());
108 let pods = generate_sorted_strings(rng, num_pods, 30..40);
109 for pod in pods {
110 let num_containers =
111 rng.random_range(self.options.containers_per_pod.clone());
112 for container_idx in 0..num_containers {
113 let container = format!("{service}_container_{container_idx}");
114 let image = format!(
115 "{container}@sha256:30375999bf03beec2187843017b10c9e88d8b1a91615df4eb6350fb39472edd9"
116 );
117
118 let num_entries =
119 rng.random_range(self.options.entries_per_container.clone());
120 for i in 0..num_entries {
121 if self.is_finished() {
122 return;
123 }
124
125 let time = i as i64 * 1024;
126 self.append_row(rng, host, &pod, service, &container, &image, time);
127 }
128 }
129 }
130 }
131
132 #[expect(clippy::too_many_arguments)]
133 fn append_row(

Callers 2

append_rowMethod · 0.45
nextMethod · 0.45

Calls 4

generate_sorted_stringsFunction · 0.85
append_rowMethod · 0.80
cloneMethod · 0.45
is_finishedMethod · 0.45

Tested by

no test coverage detected