Skip to content

Commit 2b7dd08

Browse files
committed
rustdoc-json: Time serialization.
1 parent ae3ab14 commit 2b7dd08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustdoc/json/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
279279
p.push(output.index.get(&output.root).unwrap().name.clone().unwrap());
280280
p.set_extension("json");
281281
let mut file = BufWriter::new(try_err!(File::create(&p), p));
282-
serde_json::ser::to_writer(&mut file, &output).unwrap();
282+
self.tcx
283+
.sess
284+
.time("rustdoc_json_serialization", || serde_json::ser::to_writer(&mut file, &output))
285+
.unwrap();
283286
try_err!(file.flush(), p);
284287

285288
Ok(())

0 commit comments

Comments
 (0)