diff --git a/utilities/persistent_cache/block_cache_tier_file.cc b/utilities/persistent_cache/block_cache_tier_file.cc index 970da8f184cc2e797e514f3ae95affd43f837e4a..ef77252583c4ffc49cb61fd0787f990832fcdc2b 100644 --- a/utilities/persistent_cache/block_cache_tier_file.cc +++ b/utilities/persistent_cache/block_cache_tier_file.cc @@ -38,7 +38,7 @@ Status NewRandomAccessCacheFile(Env* const env, const std::string& filepath, // // BlockCacheFile // -Status BlockCacheFile::Delete(size_t* size) { +Status BlockCacheFile::Delete(uint64_t* size) { Status status = env_->GetFileSize(Path(), size); if (!status.ok()) { return status; diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h index 8dbd60a1e91094a7ff9e0f74ba96709148487f7e..da8a4b5cdc6ecdebaf71afe94f2cf4f61980fdff 100644 --- a/utilities/persistent_cache/block_cache_tier_file.h +++ b/utilities/persistent_cache/block_cache_tier_file.h @@ -126,7 +126,7 @@ class BlockCacheFile : public LRUElement { // get block information std::list& block_infos() { return block_infos_; } // delete file and return the size of the file - virtual Status Delete(size_t* size); + virtual Status Delete(uint64_t* size); protected: port::RWMutex rwlock_; // synchronization mutex diff --git a/utilities/simulator_cache/sim_cache.cc b/utilities/simulator_cache/sim_cache.cc index e88043d9d26d01fa34928decab1942d79e6653c9..3fe0aaf9c17ae879a519dcfe898499f1db430481 100644 --- a/utilities/simulator_cache/sim_cache.cc +++ b/utilities/simulator_cache/sim_cache.cc @@ -133,8 +133,13 @@ class SimCacheImpl : public SimCache { "\n"); res.append("SimCache HITs: " + std::to_string(get_hit_counter()) + "\n"); char buff[100]; +#ifdef OS_WIN + _snprintf(buff, sizeof(buff), "SimCache HITRATE: %.2f%%\n", + get_hit_rate() * 100); +#else snprintf(buff, sizeof(buff), "SimCache HITRATE: %.2f%%\n", get_hit_rate() * 100); +#endif res.append(buff); return res; }