diff options
Diffstat (limited to 'storage/rocksdb/ha_rocksdb.h')
-rw-r--r-- | storage/rocksdb/ha_rocksdb.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h index 63bf7ffd602..d40fc539b0c 100644 --- a/storage/rocksdb/ha_rocksdb.h +++ b/storage/rocksdb/ha_rocksdb.h @@ -623,14 +623,17 @@ public: bool sorted) override MY_ATTRIBUTE((__warn_unused_result__)); - virtual double scan_time() override { + virtual IO_AND_CPU_COST scan_time() override + { + IO_AND_CPU_COST cost; DBUG_ENTER_FUNC(); - - DBUG_RETURN( - static_cast<double>((stats.records + stats.deleted) / 20.0 + 10)); + cost.io= 0; + cost.cpu= (stats.records + stats.deleted) * 0.001 + 1; + DBUG_RETURN(cost); } + IO_AND_CPU_COST keyread_time(uint index, ulong ranges, + ha_rows rows, ulonglong blocks) override; - virtual double read_time(uint, uint, ha_rows rows) override; virtual void print_error(int error, myf errflag) override; int open(const char *const name, int mode, uint test_if_locked) override |