mirror of
https://github.com/gradle/actions.git
synced 2025-04-20 09:49:19 +08:00
Include cache save/restore times in log messages
This commit is contained in:
parent
fc9ede8c46
commit
629735a72b
@ -134,7 +134,7 @@ abstract class AbstractEntryExtractor {
|
||||
): Promise<ExtractedCacheEntry> {
|
||||
const restoredEntry = await restoreCache([pattern], cacheKey, [], listener)
|
||||
if (restoredEntry) {
|
||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`)
|
||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}ms`)
|
||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey)
|
||||
} else {
|
||||
core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`)
|
||||
@ -232,8 +232,8 @@ abstract class AbstractEntryExtractor {
|
||||
cacheDebug(`No change to previously restored ${artifactType}. Not saving.`)
|
||||
entryListener.markNotSaved('contents unchanged')
|
||||
} else {
|
||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`)
|
||||
await saveCache([pattern], cacheKey, entryListener)
|
||||
core.info(`Saved ${artifactType} with key ${cacheKey} from ${pattern} in ${entryListener.savedTime}ms`)
|
||||
}
|
||||
|
||||
for (const file of matchingFiles) {
|
||||
|
@ -60,7 +60,8 @@ export class GradleUserHomeCache {
|
||||
restoreKeys:[${cacheKey.restoreKeys}]`
|
||||
)
|
||||
|
||||
const cacheResult = await restoreCache(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener)
|
||||
const cachePath = this.getCachePath()
|
||||
const cacheResult = await restoreCache(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener)
|
||||
if (!cacheResult) {
|
||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`)
|
||||
return
|
||||
@ -68,7 +69,9 @@ export class GradleUserHomeCache {
|
||||
|
||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key)
|
||||
|
||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`)
|
||||
core.info(
|
||||
`Restored ${this.cacheDescription} with key ${cacheResult.key} to ${cachePath.join()} in ${entryListener.restoredTime}ms`
|
||||
)
|
||||
|
||||
try {
|
||||
await this.afterRestore(listener)
|
||||
@ -120,9 +123,11 @@ export class GradleUserHomeCache {
|
||||
return
|
||||
}
|
||||
|
||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`)
|
||||
const cachePath = this.getCachePath()
|
||||
await saveCache(cachePath, cacheKey, gradleHomeEntryListener)
|
||||
core.info(
|
||||
`Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath.join()} in ${gradleHomeEntryListener.savedTime}ms`
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user