添加三角形提取阶段的耗时统计
在DMesh3转换过程中添加了三角形提取阶段的耗时统计, 便于性能分析和优化。 修改内容: - 在ConvertFromModelItems方法中添加Stopwatch - 统计从ModelItem提取三角形的耗时 - 日志格式:从 N 个模型项共提取 M 个三角形,耗时: X ms 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
27908540c2
commit
2e9b9fe2b3
@ -142,6 +142,8 @@ namespace NavisworksTransport
|
||||
var allTriangles = new List<Triangle3D>();
|
||||
int itemCount = 0;
|
||||
|
||||
var extractStopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
try
|
||||
@ -161,7 +163,8 @@ namespace NavisworksTransport
|
||||
}
|
||||
}
|
||||
|
||||
LogManager.Info($"[DMesh3转换] 从 {itemCount} 个模型项共提取 {allTriangles.Count} 个三角形");
|
||||
extractStopwatch.Stop();
|
||||
LogManager.Info($"[DMesh3转换] 从 {itemCount} 个模型项共提取 {allTriangles.Count} 个三角形,耗时: {extractStopwatch.ElapsedMilliseconds} ms");
|
||||
|
||||
// 转换为 DMesh3
|
||||
return Convert(allTriangles);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user