MCPcopy Create free account
hub / github.com/cometchat/cometchat-uikit-angular / measureBuildTime

Function measureBuildTime

scripts/storybook-performance.js:45–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45function measureBuildTime() {
46 logSection('Measuring Build Time');
47
48 log('Building Storybook...', colors.yellow);
49 const startTime = Date.now();
50
51 try {
52 // Clean previous build
53 if (fs.existsSync('storybook-static')) {
54 execSync('rm -rf storybook-static', { stdio: 'ignore' });
55 }
56
57 // Build Storybook
58 execSync('npm run build-storybook', {
59 stdio: 'pipe',
60 encoding: 'utf-8'
61 });
62
63 const buildTime = Date.now() - startTime;
64 log(`✓ Build completed in ${formatTime(buildTime)}`, colors.green);
65
66 return buildTime;
67 } catch (error) {
68 log('✗ Build failed', colors.red);
69 console.error(error.message);
70 return null;
71 }
72}
73
74function analyzeBuildOutput() {
75 logSection('Analyzing Build Output');

Callers 1

mainFunction · 0.85

Calls 4

logSectionFunction · 0.85
logFunction · 0.85
formatTimeFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected