From fac58c05046b6fb253bbdb31a218a5b55350b85e Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 10 Mar 2014 14:16:52 -0700 Subject: [PATCH] DBTest: remove perf_context's time > 0 check Summary: DBTest checks perf_context.seek_internal_seek_time > 0 and perf_context.find_next_user_entry_time > 0, which is not reliable. Remove them. Test Plan: ./db_test Reviewers: igor, haobo, ljin Reviewed By: igor CC: dhruba, yhchiang, leveldb Differential Revision: https://reviews.facebook.net/D16737 --- db/db_test.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/db/db_test.cc b/db/db_test.cc index 46393be69..2a8cee4e7 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -1442,12 +1442,7 @@ TEST(DBTest, IterMulti) { iter->Seek("ax"); ASSERT_EQ(IterStatus(iter), "b->vb"); - SetPerfLevel(kEnableTime); - perf_context.Reset(); iter->Seek("b"); - ASSERT_TRUE((int) perf_context.seek_internal_seek_time > 0); - ASSERT_TRUE((int) perf_context.find_next_user_entry_time > 0); - SetPerfLevel(kDisable); ASSERT_EQ(IterStatus(iter), "b->vb"); iter->Seek("z"); ASSERT_EQ(IterStatus(iter), "(invalid)"); @@ -1462,12 +1457,7 @@ TEST(DBTest, IterMulti) { // Switch from forward to reverse iter->SeekToFirst(); iter->Next(); - SetPerfLevel(kEnableTime); - perf_context.Reset(); iter->Next(); - ASSERT_EQ(0, (int) perf_context.seek_internal_seek_time); - ASSERT_TRUE((int) perf_context.find_next_user_entry_time > 0); - SetPerfLevel(kDisable); iter->Prev(); ASSERT_EQ(IterStatus(iter), "b->vb");