Skip to content

Commit

Permalink
[DOP-4334]: Add metrics to commands
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Feb 28, 2024
1 parent 92e2bdb commit 1184ac0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get install --yes curl
RUN curl --location https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install --yes nodejs
RUN apt-get install --yes build-essential
RUN apt-get install --yes python3-pip libxml2-dev libxslt-dev python-dev pkg-config
RUN apt-get install --yes python3-pip libxml2-dev libxslt-dev python-dev pkg-config time


RUN python3 -m pip install poetry
Expand Down
4 changes: 3 additions & 1 deletion src/commands/src/shared/next-gen-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ export async function nextGenDeploy({
const { outputText, errorText } = await executeAndPipeCommands(
{ command: 'yes' },
{
command: 'mut-publish',
command: 'time',
args: [
'-v',
'mut-publish',
'public',
bucket,
`--prefix=${mutPrefix}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/src/shared/next-gen-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { CliCommandResponse, executeCliCommand } from '../helpers';
export async function nextGenHtml(): Promise<CliCommandResponse> {
try {
const result = await executeCliCommand({
command: 'npm',
args: ['run', 'build'],
command: 'time',
args: ['-v', 'npm', 'run', 'build'],
options: { cwd: `${process.cwd()}/snooty` },
});
return result;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/src/shared/next-gen-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export async function nextGenParse({ job, patchId, isProd }: NextGenParseParams)
}
try {
const result = await executeCliCommand({
command: 'snooty',
args: commandArgs,
command: 'time',
args: ['-v', 'snooty', ...commandArgs],
options: { cwd: repoDir },
});
return result;
Expand Down
4 changes: 3 additions & 1 deletion src/commands/src/shared/persistence-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export async function persistenceModule({ job }: PersistenceModuleParams): Promi
const bundlePath = `${repoDir}/bundle.zip`;

const args = [
'-v',
'node',
`${process.cwd()}/modules/persistence/index.js`,
'--unhandled-rejections=strict',
'--path',
Expand All @@ -25,7 +27,7 @@ export async function persistenceModule({ job }: PersistenceModuleParams): Promi

try {
const result = await executeCliCommand({
command: 'node',
command: 'time',
args,
});

Expand Down

0 comments on commit 1184ac0

Please sign in to comment.