File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ // benchmark
2
+ const start = process . hrtime . bigint ( ) ;
3
+
4
+ // start code
5
+ const args = process . argv . slice ( 2 ) ;
6
+
7
+ if ( args . length === 0 ) {
8
+ console . log ( `
9
+ Usage: node find-runtime.mjs <project-folder>
10
+ Find @rescript/runtime directories in a project's node_modules.
11
+ Arguments:
12
+ project-folder Path to the project directory to search
13
+ Examples:
14
+ node find-runtime.mjs /path/to/project
15
+ node find-runtime.mjs .
16
+ ` ) ;
17
+ process . exit ( 1 ) ;
18
+ }
19
+
20
+ const project = args [ args . length - 1 ] ;
21
+
22
+ import { findRuntime } from "../server/src/find-runtime.ts" ;
23
+
24
+ const runtimes = await findRuntime ( project ) ;
25
+
26
+ console . log ( "Found @rescript/runtime directories:" , runtimes ) ;
27
+
28
+ // end code
29
+ const end = process . hrtime . bigint ( ) ;
30
+ const durationMs = Number ( end - start ) / 1e6 ; // convert ns → ms
31
+
32
+ console . log ( `Script took ${ durationMs . toFixed ( 3 ) } ms` ) ;
You can’t perform that action at this time.
0 commit comments