@@ -56,6 +56,8 @@ angular.module('Measure.Measure', ['ngRoute'])
5656 await runNdt7 ( sessionID ) ;
5757 }
5858
59+ runPT ( sessionID )
60+
5961 $scope . $apply ( function ( ) {
6062 $scope . currentPhase = gettextCatalog . getString ( 'Complete' ) ;
6163 $scope . currentSpeed = '' ;
@@ -182,6 +184,35 @@ angular.module('Measure.Measure', ['ngRoute'])
182184
183185 await client . start ( ) ;
184186 }
187+
188+ async function runPT ( sid ) {
189+ return pt . test (
190+ {
191+ userAcceptedDataPolicy : true ,
192+ downloadworkerfile : "/libraries/pt-download-worker.min.js" ,
193+ metadata : {
194+ client_name : "speed-measurementlab-net" ,
195+ client_session_id : sid ,
196+ max_cwnd_gain : "512" ,
197+ }
198+ } ,
199+ {
200+ serverChosen : function ( server ) {
201+ $scope . location = server . location . city + ", " +
202+ server . location . country ;
203+ $scope . address = server . machine ;
204+ console . log ( 'Testing PT to:' , {
205+ machine : server . machine ,
206+ locations : server . location ,
207+ } ) ;
208+ } ,
209+ downloadComplete : ( data ) => {
210+ console . log ( "PT result:" , data ) ;
211+ } ,
212+ } ,
213+ )
214+ }
215+
185216 } ) ;
186217
187218/**
0 commit comments