3 Commits

Author SHA1 Message Date
Chia-hung Duan
4dc3bcf012 Reland "[scudo] Add a Timer class to assist performance measurement"
This reverts commit 2e9bcadb7c8acaa8f6ec7d807e5666246923e468.

Differential Revision: https://reviews.llvm.org/D146772
2023-04-03 22:47:59 +00:00
Chia-hung Duan
2e9bcadb7c Revert "[scudo] Add a Timer class to assist performance measurement"
This reverts commit e0361396c2281a108a36d186161ace1843925431.
2023-03-23 21:49:02 +00:00
Chia-hung Duan
e0361396c2 [scudo] Add a Timer class to assist performance measurement
Add Timer and TimingManager which provide convenient way to meause the
execution time of code snippets. The output looks like,

```
-- Average Operation Time -- -- Name (# of Calls) --
          1747.2(ns)            popBatch (59)
            92.3(ns)            popBatchImpl (73)
           101.6(ns)              EmptyBatchProcess (5)
          2587.0(ns)            pushBlocksImpl (13)
```

Note that `EmptyBatchProcess` is nested under the timer `popBatchImpl`.

Reviewed By: cferris

Differential Revision: https://reviews.llvm.org/D143626
2023-03-23 19:40:15 +00:00