File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,18 @@ module.exports = function run(args, rawArgs) {
201201 build_id : data . build_id ,
202202 test_zip_size : test_zip_size ,
203203 npm_zip_size : npm_zip_size ,
204+ test_suite_zip_upload : md5data . zipUrlPresent ? 0 : 1 ,
205+ package_zip_upload : md5data . packageUrlPresent ? 0 : 1
206+ } ;
207+
208+ if ( ! md5data . zipUrlPresent && zip . tests_upload_time ) {
209+ dataToSend . test_suite_zip_size = parseFloat ( ( test_zip_size / 1024 ) . toFixed ( 2 ) ) ;
210+ dataToSend . test_suite_zip_upload_avg_speed = parseFloat ( ( ( test_zip_size * 1000 ) / ( 1024 * zip . tests_upload_time ) ) . toFixed ( 2 ) ) ;
211+ } ;
212+
213+ if ( ! md5data . packageUrlPresent && zip . npm_package_upload_time ) {
214+ dataToSend . npm_package_zip_size = parseFloat ( ( npm_zip_size / 1024 ) . toFixed ( 2 ) ) ;
215+ dataToSend . npm_package_zip_upload_avg_speed = parseFloat ( ( ( npm_zip_size * 1000 ) / ( 1024 * zip . npm_package_upload_time ) ) . toFixed ( 2 ) ) ;
204216 } ;
205217
206218 if ( zip . tests_upload_time || zip . npm_package_upload_time ) {
Original file line number Diff line number Diff line change @@ -191,6 +191,19 @@ function send(args) {
191191
192192 delete args . bstack_config ;
193193
194+ let zipUploadDetails = {
195+ test_suite_zip_upload : data . test_suite_zip_upload ,
196+ package_zip_upload : data . package_zip_upload ,
197+ test_suite_zip_size : data . test_suite_zip_size ,
198+ test_suite_zip_upload_avg_speed : data . test_suite_zip_upload_avg_speed ,
199+ npm_package_zip_size : data . npm_package_zip_size ,
200+ npm_package_zip_upload_avg_speed : data . npm_package_zip_upload_avg_speed ,
201+ }
202+
203+ Object . keys ( zipUploadDetails ) . forEach ( ( key ) => {
204+ delete data [ key ] ;
205+ } )
206+
194207 const payload = {
195208 event_type : "cypress_cli_stats" ,
196209 data : {
@@ -211,6 +224,7 @@ function send(args) {
211224 event_timestamp : new Date ( ) . toLocaleString ( ) ,
212225 data : JSON . stringify ( data ) ,
213226 raw_args : JSON . stringify ( args . raw_args ) ,
227+ ...zipUploadDetails ,
214228 ...args ,
215229 } ,
216230 } ;
You can’t perform that action at this time.
0 commit comments