From 3e5b165a9141c537f856e520a3650c63aeac7820 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 21 Jun 2011 07:10:54 +0000 Subject: [PATCH] fix invariant check defines --- src/disk_io_thread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index e62df25e5..4bb4a774b 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -1081,7 +1081,7 @@ namespace libtorrent { if (p.blocks[k].buf) { -#if !defined TORRENT_DISABLE_POOL_ALLOCATOR && !defined TORRENT_NO_EXPENSIVE_INVARIANT_CHECK +#if !defined TORRENT_DISABLE_POOL_ALLOCATOR && defined TORRENT_EXPENSIVE_INVARIANT_CHECKS TORRENT_ASSERT(is_disk_buffer(p.blocks[k].buf)); #endif ++blocks; @@ -1105,7 +1105,7 @@ namespace libtorrent { if (p.blocks[k].buf) { -#if !defined TORRENT_DISABLE_POOL_ALLOCATOR && !defined TORRENT_NO_EXPENSIVE_INVARIANT_CHECK +#if !defined TORRENT_DISABLE_POOL_ALLOCATOR && defined TORRENT_EXPENSIVE_INVARIANT_CHECKS TORRENT_ASSERT(is_disk_buffer(p.blocks[k].buf)); #endif ++blocks; @@ -1742,6 +1742,7 @@ namespace libtorrent ptime now = time_now_hires(); m_sort_time.add_sample(total_microseconds(now - sort_start)); + m_job_time.add_sample(total_microseconds(now - operation_start)); m_cache_stats.cumulative_sort_time += total_milliseconds(now - sort_start); m_cache_stats.cumulative_job_time += total_milliseconds(now - operation_start); continue;