diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-07 20:06:47 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-07 20:06:47 +0100 |
| commit | b81500c0e4c5dac5c976fc5553658d9f009ddf00 (patch) | |
| tree | 0fe795e4df9f03bdc1c047b20231aa9462259a06 /src/hash_map.cc | |
| parent | 1c0bdd8c8549f71a70090a2be0bb17d12c66ea03 (diff) | |
Use microseconds instead of milliseconds for built-in profiling
Diffstat (limited to 'src/hash_map.cc')
| -rw-r--r-- | src/hash_map.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/hash_map.cc b/src/hash_map.cc index 5799f87b..95b75f18 100644 --- a/src/hash_map.cc +++ b/src/hash_map.cc @@ -115,11 +115,12 @@ void do_profile(size_t count, StringView type) } auto after_find = Clock::now(); - write_to_debug_buffer(format("{} ({}) -- inserts: {}ms, reads: {}ms, remove: {}ms, find: {}ms ({})", type, count, - std::chrono::duration_cast<std::chrono::milliseconds>(after_insert - start).count(), - std::chrono::duration_cast<std::chrono::milliseconds>(after_read - after_insert).count(), - std::chrono::duration_cast<std::chrono::milliseconds>(after_remove - after_read).count(), - std::chrono::duration_cast<std::chrono::milliseconds>(after_find - after_remove).count(), + using namespace std::chrono; + write_to_debug_buffer(format("{} ({}) -- inserts: {}us, reads: {}us, remove: {}us, find: {}us ({})", type, count, + duration_cast<microseconds>(after_insert - start).count(), + duration_cast<microseconds>(after_read - after_insert).count(), + duration_cast<microseconds>(after_remove - after_read).count(), + duration_cast<microseconds>(after_find - after_remove).count(), c)); } |
