Skip to content

Commit 7cc9feb

Browse files
committed
Change profile calls for mesh output
1 parent 1d166d7 commit 7cc9feb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

splashsurf/src/io.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ where
290290
);
291291

292292
if let Some(extension) = output_file.extension() {
293-
profile!("writing mesh");
294-
295293
let extension = extension
296294
.to_str()
297295
.ok_or(anyhow!("Invalid extension of output file"))?;

splashsurf_lib/src/io/obj_format.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::mesh::{
44
AttributeData, CellConnectivity, Mesh3d, MeshAttribute, MeshWithData, TriMesh3d,
55
};
6-
use crate::{utils, Real};
6+
use crate::{profile, utils, Real};
77
use anyhow::Context;
88
use nalgebra::Vector3;
99
use std::fs;
@@ -18,6 +18,7 @@ pub fn mesh_to_obj<R: Real, M: Mesh3d<R>, P: AsRef<Path>>(
1818
mesh: &MeshWithData<R, M>,
1919
filename: P,
2020
) -> Result<(), anyhow::Error> {
21+
profile!("mesh_to_obj");
2122
let file = fs::OpenOptions::new()
2223
.read(true)
2324
.write(true)

splashsurf_lib/src/io/ply_format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::mesh::{
44
AttributeData, CellConnectivity, Mesh3d, MeshAttribute, MeshWithData, TriMesh3d,
55
};
66
use crate::utils::IteratorExt;
7-
use crate::Real;
7+
use crate::{profile, Real};
88
use anyhow::{anyhow, Context};
99
use nalgebra::Vector3;
1010
use num_traits::ToPrimitive;
@@ -194,7 +194,7 @@ pub fn mesh_to_ply<R: Real, M: Mesh3d<R>, P: AsRef<Path>>(
194194
filename: P,
195195
) -> Result<(), anyhow::Error> {
196196
// TODO: Support attributes
197-
197+
profile!("mesh_to_ply");
198198
let file = fs::OpenOptions::new()
199199
.read(true)
200200
.write(true)

splashsurf_lib/src/io/vtk_format.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use crate::mesh::{AttributeData, IntoVtkDataSet, MeshAttribute, MeshWithData, TriMesh3d};
44
use crate::utils::IteratorExt;
5-
use crate::{utils, Real, RealConvert};
5+
use crate::{profile, utils, Real, RealConvert};
66
use anyhow::{anyhow, Context};
77
use nalgebra::Vector3;
88
use std::borrow::Cow;
@@ -187,6 +187,7 @@ pub fn write_vtk<P: AsRef<Path>>(
187187
filename: P,
188188
title: &str,
189189
) -> Result<(), anyhow::Error> {
190+
profile!("write_vtk");
190191
let vtk_file = Vtk {
191192
version: Version::new((4, 2)),
192193
title: title.to_string(),

0 commit comments

Comments
 (0)