Skip to content

Commit 6335617

Browse files
committed
Add initTime
1 parent 4e49c3d commit 6335617

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { createCommitMethods } from './commits.js';
88
export * from './types.js';
99
export * from './parse-object.js';
1010
export async function createGitReader(gitdir: string) {
11+
const startInitTime = Date.now();
1112
const [refIndex, looseObjectIndex, packedObjectIndex] = await Promise.all([
1213
createRefIndex(gitdir),
1314
createLooseObjectIndex(gitdir),
@@ -39,6 +40,8 @@ export async function createGitReader(gitdir: string) {
3940
packed: packedObjects
4041
}
4142
};
42-
}
43+
},
44+
45+
initTime: Date.now() - startInitTime
4346
};
4447
}

0 commit comments

Comments
 (0)