summaryrefslogtreecommitdiff
path: root/xmake/modules/private/cache/build_cache.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-20 22:35:34 +0800
committerruki <[email protected]>2022-05-20 22:35:34 +0800
commitac1ddeef8d1e976bd46ad34d12eb16bded52405e (patch)
treea6b4d0dfa708c227ade6f4473c1bad842362e40c /xmake/modules/private/cache/build_cache.lua
parente0c42d493f49eb2ede38daeb078dddd6e6f581ce (diff)
improve dump
Diffstat (limited to 'xmake/modules/private/cache/build_cache.lua')
-rw-r--r--xmake/modules/private/cache/build_cache.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua
index 3da7e35f0..6d7a0102f 100644
--- a/xmake/modules/private/cache/build_cache.lua
+++ b/xmake/modules/private/cache/build_cache.lua
@@ -90,14 +90,14 @@ end
function dump_stats()
local hit_count = (_g.hit_count or 0)
local total_count = (_g.total_count or 0)
- local files_count = (_g.files_count or 0)
+ local newfiles_count = (_g.newfiles_count or 0)
vprint("")
vprint("build cache stats:")
vprint("cache directory: %s", rootdir())
vprint("cache hit rate: %d%%", hitrate())
vprint("cache hit: %d", hit_count)
vprint("cache miss: %d", total_count - hit_count)
- vprint("files in cache: %d", files_count)
+ vprint("new cached files: %d", newfiles_count)
end
-- get object file
@@ -114,7 +114,7 @@ end
function put(cachekey, objectfile)
local objectfile_cached = path.join(rootdir(), cachekey:sub(1, 2):lower(), cachekey)
os.cp(objectfile, objectfile_cached)
- _g.files_count = (_g.files_count or 0) + 1
+ _g.newfiles_count = (_g.newfiles_count or 0) + 1
end
-- build with cache