- Delphi High Performance
- Primo? Gabrijelcic
- 294字
- 2021-06-24 19:23:00
Sampling Profiler
The Sampling Profiler is, as its name suggests, a sampling profiler for Delphi, written by Eric Grange. You can find it at www.delphitools.info. Although it officially supports only Delphi 5 to XE4, it will function well with applications written in modern Delphis.
The strongest part of the Sampling Profiler is its configurability for multithreaded sampling. You can specify which CPUs will execute the profiler and which profiled application. You can also focus on a specific thread by issuing a OutputDebugString('SAMPLING THREAD threadID') command from your code (replace threadID with the real ID of the thread you want to profile). It is also very simple to turn profiling on or off by calling OutputDebugString('SAMPLING ON') and OutputDebugString('SAMPLING OFF').
An interesting feature of the Sampling Profiler, which other profilers don't provide, is the ability to enable web server in the profiler. After that, we can use a browser to connect to the profiler (if firewalls allow us, of course) and we get an instant insight into the currently most executed lines of our program:

The weakest point of the Sampling Profiler is its complete inability to select methods that are of interest to us. As we can see in the following screenshot, we get some methods from Generics.Collections mixed between methods from SlowCode. This only distracts us from our task—trying to find the slow parts of SlowCode.
Saying all that, I must admit that the display of profiling results is really neatly implemented. The results view is simple, clean, and easy to use:

The Sampling Profiler would be a perfect solution for occasional profiling if it would only allow us to select topics of interest.
- 大規模數據分析和建模:基于Spark與R
- Mastering Ninject for Dependency Injection
- UDK iOS Game Development Beginner's Guide
- Microsoft Power BI數據可視化與數據分析
- 數據中心數字孿生應用實踐
- Python數據分析與挖掘實戰(第3版)
- 區塊鏈技術應用與實踐案例
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- Spring Boot 2.0 Cookbook(Second Edition)
- 改進的群智能算法及其應用
- Access 2016數據庫應用基礎
- 大數據測試技術:數據采集、分析與測試實踐(在線實驗+在線自測)
- 標簽類目體系:面向業務的數據資產設計方法論
- 推薦系統全鏈路設計:原理解讀與業務實踐
- Machine Learning for Mobile