Skip to content

Commit

Permalink
fix: add more timing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Oct 13, 2023
1 parent 2b01d47 commit f5d093b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function cypressSplit(on, config) {
let splitSpecs

const cwd = process.cwd()
console.log('spec from the current directory %s', cwd)
console.log('%s specs from the current directory %s', cwd, label)

if (SPLIT_FILE) {
debug('loading split file %s', SPLIT_FILE)
Expand Down Expand Up @@ -190,6 +190,16 @@ function cypressSplit(on, config) {
debug(sums)

splitSpecs = chunks[splitIndex].map((item) => item.specName)
console.log(
'%s split %d specs using durations from %s file',
label,
specsWithDurations.length,
SPLIT_FILE,
)
console.log(
'%s approximate total duration for current chunk is %s (plus Cypress overhead)',
humanizeDuration(sums[splitIndex]),
)
} catch (err) {
console.error('%s Could not split specs by duration', label)
console.error(err.message)
Expand Down

0 comments on commit f5d093b

Please sign in to comment.