CCSDS TM Transfer Frames (CCSDS 132.0-B-3)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

mass replace Printf.sprintf/printf with Fmt.str/pr (merlint E200)

112 files across the monorepo. Printf.sprintf → Fmt.str,
Printf.printf → Fmt.pr for consistent formatting library usage.

+11 -11
+8 -8
bench/bench_tm.ml
··· 111 111 let words_per_iter = 112 112 (minor_after -. minor_before) /. float_of_int iterations 113 113 in 114 - Printf.printf " %-20s %8.1f ns/iter %8.1f words/iter\n" name elapsed_ns 114 + Fmt.pr " %-20s %8.1f ns/iter %8.1f words/iter\n" name elapsed_ns 115 115 words_per_iter 116 116 117 117 let () = 118 - Printf.printf "TM Header Benchmark: original vs wire\n"; 119 - Printf.printf "=====================================\n"; 120 - Printf.printf "(processing 1000 headers per iteration)\n\n"; 118 + Fmt.pr "TM Header Benchmark: original vs wire\n"; 119 + Fmt.pr "=====================================\n"; 120 + Fmt.pr "(processing 1000 headers per iteration)\n\n"; 121 121 122 - Printf.printf "Original Tm (string-based):\n"; 122 + Fmt.pr "Original Tm (string-based):\n"; 123 123 time_it "decode" 1000 original_decode; 124 124 time_it "encode" 1000 original_encode; 125 125 time_it "roundtrip" 1000 original_roundtrip; 126 - Printf.printf "\n"; 126 + Fmt.pr "\n"; 127 127 128 - Printf.printf "Wire Codec (bytes-based):\n"; 128 + Fmt.pr "Wire Codec (bytes-based):\n"; 129 129 time_it "decode" 1000 wire_decode; 130 130 time_it "encode" 1000 wire_encode; 131 131 time_it "roundtrip" 1000 wire_roundtrip; 132 - Printf.printf "\n" 132 + Fmt.pr "\n"
+1 -1
test/interop/dariol83/test.ml
··· 108 108 let string_to_hex s = 109 109 let buf = Buffer.create (String.length s * 2) in 110 110 String.iter 111 - (fun c -> Buffer.add_string buf (Printf.sprintf "%02x" (Char.code c))) 111 + (fun c -> Buffer.add_string buf (Fmt.str "%02x" (Char.code c))) 112 112 s; 113 113 Buffer.contents buf 114 114
+2 -2
test/test_tm.ml
··· 220 220 f.pf_first_hdr_ptr (String.length f.pf_data) 221 221 (match f.pf_ocf with 222 222 | None -> "None" 223 - | Some v -> Printf.sprintf "0x%08x" v) 223 + | Some v -> Fmt.str "0x%08x" v) 224 224 (match f.pf_fecf with 225 225 | None -> "None" 226 - | Some v -> Printf.sprintf "0x%04x" v)) 226 + | Some v -> Fmt.str "0x%04x" v)) 227 227 Tm.equal_packed_frame 228 228 229 229 let test_packed_frame_roundtrip () =