diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index 3707543eb055bf..86cd480352bea2 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -793,6 +793,13 @@ impl<'a> DenoCompileBinaryWriter<'a> { }; output_vfs(&vfs, display_output_filename); + log::info!( + "{} {}\n", + crate::colors::bold("Remote modules size:"), + crate::util::display::human_size( + remote_modules_store.get_data_byte_len() as f64 + ) + ); let metadata = Metadata { argv: compile_flags.args.clone(), diff --git a/cli/standalone/serialization.rs b/cli/standalone/serialization.rs index 30802aa08197dd..95216bc6b61931 100644 --- a/cli/standalone/serialization.rs +++ b/cli/standalone/serialization.rs @@ -271,6 +271,10 @@ impl RemoteModulesStoreBuilder { } } } + + pub fn get_data_byte_len(&self) -> u64 { + self.data_byte_len + } } pub enum DenoCompileModuleSource { diff --git a/tests/specs/compile/env_vars_support/compile.out b/tests/specs/compile/env_vars_support/compile.out index cba114b1f7c55e..06eace1c192228 100644 --- a/tests/specs/compile/env_vars_support/compile.out +++ b/tests/specs/compile/env_vars_support/compile.out @@ -10,3 +10,5 @@ out[WILDLINE] Size: [WILDLINE] +Remote modules size: [WILDLINE] + diff --git a/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out b/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out index fa1dd2bf9fb459..2cfa6b71266657 100644 --- a/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out +++ b/tests/specs/compile/global_npm_cache_implicit_read_permission/compile.out @@ -47,3 +47,5 @@ main[WILDLINE] Size: [WILDLINE] +Remote modules size: [WILDLINE] + diff --git a/tests/specs/compile/include/symlink_twice/compile.out b/tests/specs/compile/include/symlink_twice/compile.out index 6ae93bf1cb6b92..43c94a89c74cf6 100644 --- a/tests/specs/compile/include/symlink_twice/compile.out +++ b/tests/specs/compile/include/symlink_twice/compile.out @@ -9,3 +9,5 @@ main[WILDLINE] Size: [WILDLINE] +Remote modules size: [WILDLINE] + diff --git a/tests/specs/compile/npm_fs/compile.out b/tests/specs/compile/npm_fs/compile.out index c2ecef40155e20..d8b09b6be7e091 100644 --- a/tests/specs/compile/npm_fs/compile.out +++ b/tests/specs/compile/npm_fs/compile.out @@ -8,3 +8,5 @@ main[WILDLINE] Size: [WILDLINE] +Remote modules size: [WILDLINE] + diff --git a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out index 538aaa414c6904..5cb964c8e1a67d 100644 --- a/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out +++ b/tests/testdata/compile/node_modules_symlink_outside/main_compile_folder.out @@ -15,3 +15,5 @@ bin[WILDLINE] Size: [WILDLINE] +Remote modules size: [WILDLINE] +