@webex/internal-plugin-metrics 3.8.1-next.1 → 3.8.1-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +49 -0
- package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.js +204 -49
- package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js +6 -0
- package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
- package/dist/call-diagnostic/config.js +3 -1
- package/dist/call-diagnostic/config.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics.js +1 -1
- package/dist/metrics.types.js.map +1 -1
- package/dist/new-metrics.js +43 -1
- package/dist/new-metrics.js.map +1 -1
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +15 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +135 -5
- package/dist/types/call-diagnostic/config.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/metrics.types.d.ts +17 -6
- package/dist/types/new-metrics.d.ts +19 -2
- package/package.json +12 -12
- package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +58 -0
- package/src/call-diagnostic/call-diagnostic-metrics.ts +207 -26
- package/src/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/src/call-diagnostic/config.ts +3 -0
- package/src/index.ts +2 -0
- package/src/metrics.types.ts +22 -5
- package/src/new-metrics.ts +52 -1
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +20 -1
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +167 -0
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +226 -11
- package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
- package/test/unit/spec/new-metrics.ts +67 -2
- package/test/unit/spec/prelogin-metrics-batcher.ts +1 -0
|
@@ -446,6 +446,36 @@ describe('internal-plugin-metrics', () => {
|
|
|
446
446
|
assert.deepEqual(cdl.getClickToInterstitial(), 0);
|
|
447
447
|
});
|
|
448
448
|
|
|
449
|
+
it('calculates getClickToInterstitialWithUserDelay correctly', () => {
|
|
450
|
+
cdl.saveTimestamp({
|
|
451
|
+
key: 'internal.client.meeting.click.joinbutton',
|
|
452
|
+
value: 10,
|
|
453
|
+
});
|
|
454
|
+
cdl.saveTimestamp({
|
|
455
|
+
key: 'internal.client.meeting.interstitial-window.showed',
|
|
456
|
+
value: 20,
|
|
457
|
+
});
|
|
458
|
+
assert.deepEqual(cdl.getClickToInterstitialWithUserDelay(), 10);
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
it('calculates getClickToInterstitialWithUserDelay without join button timestamp', () => {
|
|
462
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 5);
|
|
463
|
+
cdl.saveTimestamp({
|
|
464
|
+
key: 'internal.client.meeting.interstitial-window.showed',
|
|
465
|
+
value: 20,
|
|
466
|
+
});
|
|
467
|
+
assert.deepEqual(cdl.getClickToInterstitialWithUserDelay(), 5);
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
it('calculates getClickToInterstitialWithUserDelay without join button timestamp when it is 0', () => {
|
|
471
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 0);
|
|
472
|
+
cdl.saveTimestamp({
|
|
473
|
+
key: 'internal.client.meeting.interstitial-window.showed',
|
|
474
|
+
value: 20,
|
|
475
|
+
});
|
|
476
|
+
assert.deepEqual(cdl.getClickToInterstitialWithUserDelay(), 0);
|
|
477
|
+
});
|
|
478
|
+
|
|
449
479
|
it('calculates getInterstitialToJoinOK correctly', () => {
|
|
450
480
|
cdl.saveTimestamp({
|
|
451
481
|
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
@@ -554,6 +584,78 @@ describe('internal-plugin-metrics', () => {
|
|
|
554
584
|
assert.deepEqual(cdl.getTotalJMT(), undefined);
|
|
555
585
|
});
|
|
556
586
|
|
|
587
|
+
it('calculates getTotalJMTWithUserDelay correctly', () => {
|
|
588
|
+
cdl.saveTimestamp({
|
|
589
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
590
|
+
value: 5,
|
|
591
|
+
});
|
|
592
|
+
cdl.saveTimestamp({
|
|
593
|
+
key: 'internal.client.meeting.click.joinbutton',
|
|
594
|
+
value: 10,
|
|
595
|
+
});
|
|
596
|
+
cdl.saveTimestamp({
|
|
597
|
+
key: 'internal.client.meeting.interstitial-window.showed',
|
|
598
|
+
value: 20,
|
|
599
|
+
});
|
|
600
|
+
cdl.saveTimestamp({
|
|
601
|
+
key: 'client.locus.join.response',
|
|
602
|
+
value: 40,
|
|
603
|
+
});
|
|
604
|
+
assert.deepEqual(cdl.getTotalJMTWithUserDelay(), 45);
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
it('calculates getTotalJMTWithUserDelay correctly when clickToInterstitialWithUserDelay is 0', () => {
|
|
608
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 0);
|
|
609
|
+
cdl.saveTimestamp({
|
|
610
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
611
|
+
value: 20,
|
|
612
|
+
});
|
|
613
|
+
cdl.saveTimestamp({
|
|
614
|
+
key: 'client.locus.join.response',
|
|
615
|
+
value: 40,
|
|
616
|
+
});
|
|
617
|
+
assert.deepEqual(cdl.getTotalJMTWithUserDelay(), 20);
|
|
618
|
+
});
|
|
619
|
+
|
|
620
|
+
it('calculates getTotalJMTWithUserDelay correctly when interstitialToJoinOk is 0', () => {
|
|
621
|
+
cdl.saveTimestamp({
|
|
622
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
623
|
+
value: 40,
|
|
624
|
+
});
|
|
625
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 12);
|
|
626
|
+
cdl.saveTimestamp({
|
|
627
|
+
key: 'client.locus.join.response',
|
|
628
|
+
value: 40,
|
|
629
|
+
});
|
|
630
|
+
assert.deepEqual(cdl.getTotalJMTWithUserDelay(), 12);
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
it('calculates getTotalJMTWithUserDelay correctly when both clickToInterstitialWithUserDelay and interstitialToJoinOk are 0', () => {
|
|
634
|
+
cdl.saveTimestamp({
|
|
635
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
636
|
+
value: 40,
|
|
637
|
+
});
|
|
638
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 0);
|
|
639
|
+
cdl.saveTimestamp({
|
|
640
|
+
key: 'client.locus.join.response',
|
|
641
|
+
value: 40,
|
|
642
|
+
});
|
|
643
|
+
assert.deepEqual(cdl.getTotalJMTWithUserDelay(), 0);
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
it('calculates getTotalJMTWithUserDelay correctly when both clickToInterstitialWithUserDelay is not a number', () => {
|
|
647
|
+
cdl.saveTimestamp({
|
|
648
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
649
|
+
value: 40,
|
|
650
|
+
});
|
|
651
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 'eleven' as unknown as number);
|
|
652
|
+
cdl.saveTimestamp({
|
|
653
|
+
key: 'client.locus.join.response',
|
|
654
|
+
value: 40,
|
|
655
|
+
});
|
|
656
|
+
assert.deepEqual(cdl.getTotalJMTWithUserDelay(), undefined);
|
|
657
|
+
});
|
|
658
|
+
|
|
557
659
|
it('calculates getTotalMediaJMT correctly', () => {
|
|
558
660
|
cdl.saveTimestamp({
|
|
559
661
|
key: 'internal.client.meeting.click.joinbutton',
|
|
@@ -627,6 +729,71 @@ describe('internal-plugin-metrics', () => {
|
|
|
627
729
|
assert.deepEqual(cdl.getTotalMediaJMT(), 31);
|
|
628
730
|
});
|
|
629
731
|
|
|
732
|
+
it('calculates getTotalMediaJMTWithUserDelay correctly', () => {
|
|
733
|
+
cdl.saveLatency('internal.click.to.interstitial.with.user.delay', 7);
|
|
734
|
+
cdl.saveTimestamp({
|
|
735
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
736
|
+
value: 10,
|
|
737
|
+
});
|
|
738
|
+
cdl.saveTimestamp({
|
|
739
|
+
key: 'client.locus.join.request',
|
|
740
|
+
value: 12,
|
|
741
|
+
});
|
|
742
|
+
cdl.saveTimestamp({
|
|
743
|
+
key: 'client.locus.join.response',
|
|
744
|
+
value: 20,
|
|
745
|
+
});
|
|
746
|
+
cdl.saveTimestamp({
|
|
747
|
+
key: 'internal.host.meeting.participant.admitted',
|
|
748
|
+
value: 24,
|
|
749
|
+
});
|
|
750
|
+
cdl.saveTimestamp({
|
|
751
|
+
key: 'client.ice.start',
|
|
752
|
+
value: 30,
|
|
753
|
+
});
|
|
754
|
+
cdl.saveTimestamp({
|
|
755
|
+
key: 'client.ice.end',
|
|
756
|
+
value: 40,
|
|
757
|
+
});
|
|
758
|
+
assert.deepEqual(cdl.getTotalMediaJMTWithUserDelay(), 35);
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
it('calculates getTotalMediaJMTWithUserDelay correctly for guest join', () => {
|
|
762
|
+
cdl.saveTimestamp({
|
|
763
|
+
key: 'internal.client.meeting.click.joinbutton',
|
|
764
|
+
value: 5,
|
|
765
|
+
});
|
|
766
|
+
cdl.saveTimestamp({
|
|
767
|
+
key: 'internal.client.meeting.interstitial-window.showed',
|
|
768
|
+
value: 8,
|
|
769
|
+
});
|
|
770
|
+
cdl.saveTimestamp({
|
|
771
|
+
key: 'internal.client.interstitial-window.click.joinbutton',
|
|
772
|
+
value: 10,
|
|
773
|
+
});
|
|
774
|
+
cdl.saveTimestamp({
|
|
775
|
+
key: 'client.locus.join.request',
|
|
776
|
+
value: 12,
|
|
777
|
+
});
|
|
778
|
+
cdl.saveTimestamp({
|
|
779
|
+
key: 'client.locus.join.response',
|
|
780
|
+
value: 20,
|
|
781
|
+
});
|
|
782
|
+
cdl.saveTimestamp({
|
|
783
|
+
key: 'internal.host.meeting.participant.admitted',
|
|
784
|
+
value: 24,
|
|
785
|
+
});
|
|
786
|
+
cdl.saveTimestamp({
|
|
787
|
+
key: 'client.ice.start',
|
|
788
|
+
value: 30,
|
|
789
|
+
});
|
|
790
|
+
cdl.saveTimestamp({
|
|
791
|
+
key: 'client.ice.end',
|
|
792
|
+
value: 40,
|
|
793
|
+
});
|
|
794
|
+
assert.deepEqual(cdl.getTotalMediaJMTWithUserDelay(), 31);
|
|
795
|
+
});
|
|
796
|
+
|
|
630
797
|
it('calculates getJoinConfJMT correctly', () => {
|
|
631
798
|
cdl.saveTimestamp({
|
|
632
799
|
key: 'client.locus.join.request',
|
|
@@ -185,7 +185,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
185
185
|
publicNetworkPrefix: '1.1.1.1',
|
|
186
186
|
localNetworkPrefix: '1.1.1.1',
|
|
187
187
|
os: getOSNameInternal(),
|
|
188
|
-
osVersion: getOSVersion(),
|
|
188
|
+
osVersion: getOSVersion() || 'unknown',
|
|
189
189
|
subClientType: 'WEB_APP',
|
|
190
190
|
},
|
|
191
191
|
environment: 'meeting_evn',
|
|
@@ -218,7 +218,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
218
218
|
publicNetworkPrefix: '1.1.1.1',
|
|
219
219
|
localNetworkPrefix: '1.1.1.1',
|
|
220
220
|
os: getOSNameInternal(),
|
|
221
|
-
osVersion: getOSVersion(),
|
|
221
|
+
osVersion: getOSVersion() || 'unknown',
|
|
222
222
|
subClientType: 'WEB_APP',
|
|
223
223
|
clientLaunchMethod: 'url-handler',
|
|
224
224
|
},
|
|
@@ -253,7 +253,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
253
253
|
publicNetworkPrefix: '1.1.1.1',
|
|
254
254
|
localNetworkPrefix: '1.1.1.1',
|
|
255
255
|
os: getOSNameInternal(),
|
|
256
|
-
osVersion: getOSVersion(),
|
|
256
|
+
osVersion: getOSVersion() || 'unknown',
|
|
257
257
|
subClientType: 'WEB_APP',
|
|
258
258
|
clientLaunchMethod: 'url-handler',
|
|
259
259
|
},
|
|
@@ -288,7 +288,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
288
288
|
publicNetworkPrefix: '1.1.1.1',
|
|
289
289
|
localNetworkPrefix: '1.1.1.1',
|
|
290
290
|
os: getOSNameInternal(),
|
|
291
|
-
osVersion: getOSVersion(),
|
|
291
|
+
osVersion: getOSVersion() || 'unknown',
|
|
292
292
|
subClientType: 'WEB_APP',
|
|
293
293
|
clientLaunchMethod: 'url-handler',
|
|
294
294
|
browserLaunchMethod: 'thinclient',
|
|
@@ -316,7 +316,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
316
316
|
publicNetworkPrefix: '1.1.1.1',
|
|
317
317
|
localNetworkPrefix: '1.1.1.1',
|
|
318
318
|
os: getOSNameInternal(),
|
|
319
|
-
osVersion: getOSVersion(),
|
|
319
|
+
osVersion: getOSVersion() || 'unknown',
|
|
320
320
|
subClientType: 'WEB_APP',
|
|
321
321
|
},
|
|
322
322
|
name: 'endpoint',
|
|
@@ -345,7 +345,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
345
345
|
majorVersion: 43,
|
|
346
346
|
minorVersion: 9,
|
|
347
347
|
os: getOSNameInternal(),
|
|
348
|
-
osVersion: getOSVersion(),
|
|
348
|
+
osVersion: getOSVersion() || 'unknown',
|
|
349
349
|
subClientType: 'WEB_APP',
|
|
350
350
|
},
|
|
351
351
|
environment: 'meeting_evn',
|
|
@@ -368,7 +368,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
368
368
|
publicNetworkPrefix: '1.3.4.0',
|
|
369
369
|
localNetworkPrefix: undefined,
|
|
370
370
|
os: getOSNameInternal(),
|
|
371
|
-
osVersion: getOSVersion(),
|
|
371
|
+
osVersion: getOSVersion() || 'unknown',
|
|
372
372
|
subClientType: 'WEB_APP',
|
|
373
373
|
},
|
|
374
374
|
name: 'endpoint',
|
|
@@ -2539,7 +2539,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2539
2539
|
applicationSoftwareType: 'webex-js-sdk',
|
|
2540
2540
|
applicationSoftwareVersion: 'webex-version',
|
|
2541
2541
|
mediaEngineSoftwareType: 'browser',
|
|
2542
|
-
mediaEngineSoftwareVersion: getOSVersion(),
|
|
2542
|
+
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2543
2543
|
startTime: now.toISOString(),
|
|
2544
2544
|
},
|
|
2545
2545
|
},
|
|
@@ -2578,7 +2578,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2578
2578
|
applicationSoftwareType: 'webex-js-sdk',
|
|
2579
2579
|
applicationSoftwareVersion: 'webex-version',
|
|
2580
2580
|
mediaEngineSoftwareType: 'browser',
|
|
2581
|
-
mediaEngineSoftwareVersion: getOSVersion(),
|
|
2581
|
+
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2582
2582
|
startTime: now.toISOString(),
|
|
2583
2583
|
},
|
|
2584
2584
|
},
|
|
@@ -2615,7 +2615,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
2615
2615
|
applicationSoftwareType: 'webex-js-sdk',
|
|
2616
2616
|
applicationSoftwareVersion: 'webex-version',
|
|
2617
2617
|
mediaEngineSoftwareType: 'browser',
|
|
2618
|
-
mediaEngineSoftwareVersion: getOSVersion(),
|
|
2618
|
+
mediaEngineSoftwareVersion: getOSVersion() || 'unknown',
|
|
2619
2619
|
startTime: now.toISOString(),
|
|
2620
2620
|
},
|
|
2621
2621
|
},
|
|
@@ -3466,7 +3466,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
3466
3466
|
localNetworkPrefix: '192.168.1.80',
|
|
3467
3467
|
publicNetworkPrefix: '1.3.4.0',
|
|
3468
3468
|
os: getOSNameInternal() || 'unknown',
|
|
3469
|
-
osVersion: getOSVersion(),
|
|
3469
|
+
osVersion: getOSVersion() || 'unknown',
|
|
3470
3470
|
subClientType: 'WEB_APP',
|
|
3471
3471
|
},
|
|
3472
3472
|
environment: 'meeting_evn',
|
|
@@ -3807,5 +3807,220 @@ describe('internal-plugin-metrics', () => {
|
|
|
3807
3807
|
assert.notCalled(submitClientEventSpy);
|
|
3808
3808
|
});
|
|
3809
3809
|
});
|
|
3810
|
+
|
|
3811
|
+
describe('#submitFeatureEvent', () => {
|
|
3812
|
+
it('should submit feature event successfully with meetingId', () => {
|
|
3813
|
+
const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
|
|
3814
|
+
const submitToCallFeaturesSpy = sinon.spy(cd, 'submitToCallFeatures');
|
|
3815
|
+
sinon.stub(cd, 'getOrigin').returns({origin: 'fake-origin'});
|
|
3816
|
+
|
|
3817
|
+
const options = {
|
|
3818
|
+
meetingId: fakeMeeting.id,
|
|
3819
|
+
};
|
|
3820
|
+
cd.setMercuryConnectedStatus(true);
|
|
3821
|
+
|
|
3822
|
+
cd.submitFeatureEvent({
|
|
3823
|
+
name: 'client.feature.meeting.summary',
|
|
3824
|
+
payload: {
|
|
3825
|
+
meetingSummaryInfo: {
|
|
3826
|
+
featureName: 'syncSystemMuteStatus',
|
|
3827
|
+
featureActions: [{
|
|
3828
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
3829
|
+
actionId: '14200',
|
|
3830
|
+
isInitialValue: false,
|
|
3831
|
+
clickCount: '1'
|
|
3832
|
+
}]
|
|
3833
|
+
},
|
|
3834
|
+
},
|
|
3835
|
+
options,
|
|
3836
|
+
});
|
|
3837
|
+
|
|
3838
|
+
assert.calledWith(
|
|
3839
|
+
prepareDiagnosticEventSpy,
|
|
3840
|
+
{
|
|
3841
|
+
name: 'client.feature.meeting.summary',
|
|
3842
|
+
canProceed: true,
|
|
3843
|
+
identifiers: {
|
|
3844
|
+
correlationId: 'correlationId',
|
|
3845
|
+
userId: 'userId',
|
|
3846
|
+
deviceId: 'deviceUrl',
|
|
3847
|
+
orgId: 'orgId',
|
|
3848
|
+
locusUrl: 'locus/url',
|
|
3849
|
+
locusId: 'url',
|
|
3850
|
+
locusStartTime: 'lastActive',
|
|
3851
|
+
},
|
|
3852
|
+
eventData: { webClientDomain: 'whatever'},
|
|
3853
|
+
userType: 'host',
|
|
3854
|
+
loginType: 'login-ci',
|
|
3855
|
+
isConvergedArchitectureEnabled: undefined,
|
|
3856
|
+
webexSubServiceType: undefined,
|
|
3857
|
+
webClientPreload: undefined,
|
|
3858
|
+
meetingSummaryInfo: {
|
|
3859
|
+
featureName: 'syncSystemMuteStatus',
|
|
3860
|
+
featureActions: [{
|
|
3861
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
3862
|
+
actionId: '14200',
|
|
3863
|
+
isInitialValue: false,
|
|
3864
|
+
clickCount: '1'
|
|
3865
|
+
}]
|
|
3866
|
+
},
|
|
3867
|
+
key: "UcfFeatureUsage",
|
|
3868
|
+
},
|
|
3869
|
+
options
|
|
3870
|
+
);
|
|
3871
|
+
|
|
3872
|
+
assert.calledWith(submitToCallFeaturesSpy, {
|
|
3873
|
+
eventId: 'my-fake-id',
|
|
3874
|
+
version: 1,
|
|
3875
|
+
origin: {
|
|
3876
|
+
origin: 'fake-origin',
|
|
3877
|
+
},
|
|
3878
|
+
event: {
|
|
3879
|
+
canProceed: true,
|
|
3880
|
+
eventData: { webClientDomain: 'whatever'},
|
|
3881
|
+
identifiers: {
|
|
3882
|
+
correlationId: 'correlationId',
|
|
3883
|
+
deviceId: 'deviceUrl',
|
|
3884
|
+
locusId: 'url',
|
|
3885
|
+
locusStartTime: 'lastActive',
|
|
3886
|
+
locusUrl: 'locus/url',
|
|
3887
|
+
orgId: 'orgId',
|
|
3888
|
+
userId: 'userId',
|
|
3889
|
+
},
|
|
3890
|
+
loginType: 'login-ci',
|
|
3891
|
+
name: 'client.feature.meeting.summary',
|
|
3892
|
+
userType: 'host',
|
|
3893
|
+
isConvergedArchitectureEnabled: undefined,
|
|
3894
|
+
webexSubServiceType: undefined,
|
|
3895
|
+
webClientPreload: undefined,
|
|
3896
|
+
meetingSummaryInfo: {
|
|
3897
|
+
featureName: 'syncSystemMuteStatus',
|
|
3898
|
+
featureActions: [{
|
|
3899
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
3900
|
+
actionId: '14200',
|
|
3901
|
+
isInitialValue: false,
|
|
3902
|
+
clickCount: '1'
|
|
3903
|
+
}]
|
|
3904
|
+
},
|
|
3905
|
+
key: "UcfFeatureUsage",
|
|
3906
|
+
},
|
|
3907
|
+
originTime: {
|
|
3908
|
+
sent: 'not_defined_yet',
|
|
3909
|
+
triggered: now.toISOString(),
|
|
3910
|
+
},
|
|
3911
|
+
senderCountryCode: 'UK',
|
|
3912
|
+
});
|
|
3913
|
+
|
|
3914
|
+
const webexLoggerLogCalls = webex.logger.log.getCalls();
|
|
3915
|
+
assert.deepEqual(webexLoggerLogCalls[1].args, [
|
|
3916
|
+
'call-diagnostic-events-feature -> ',
|
|
3917
|
+
'CallFeatureMetrics: @submitFeatureEvent. Submit Client Feature Event CA event.',
|
|
3918
|
+
`name: client.feature.meeting.summary`,
|
|
3919
|
+
]);
|
|
3920
|
+
});
|
|
3921
|
+
});
|
|
3922
|
+
|
|
3923
|
+
describe('#submitDelayedClientFeatureEvents', () => {
|
|
3924
|
+
it('does not call submitFeatureEvent if there were no delayed events', () => {
|
|
3925
|
+
const submitFeatureEventSpy = sinon.spy(cd, 'submitFeatureEvent');
|
|
3926
|
+
|
|
3927
|
+
cd.submitDelayedClientFeatureEvents();
|
|
3928
|
+
|
|
3929
|
+
assert.notCalled(submitFeatureEventSpy);
|
|
3930
|
+
});
|
|
3931
|
+
|
|
3932
|
+
it('calls submitFeatureEvent for every delayed event and clears delayedClientFeatureEvents array', () => {
|
|
3933
|
+
const submitFeatureEventSpy = sinon.spy(cd, 'submitFeatureEvent');
|
|
3934
|
+
const submitToCallFeaturesSpy = sinon.spy(cd, 'submitToCallFeatures');
|
|
3935
|
+
|
|
3936
|
+
const options = {
|
|
3937
|
+
meetingId: 'meetingId',
|
|
3938
|
+
};
|
|
3939
|
+
|
|
3940
|
+
cd.submitFeatureEvent({
|
|
3941
|
+
name: 'client.feature.meeting.summary',
|
|
3942
|
+
options,
|
|
3943
|
+
payload: {
|
|
3944
|
+
meetingSummaryInfo: {
|
|
3945
|
+
featureName: 'syncSystemMuteStatus',
|
|
3946
|
+
featureActions: [{
|
|
3947
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
3948
|
+
actionId: '14200',
|
|
3949
|
+
isInitialValue: false,
|
|
3950
|
+
clickCount: '1'
|
|
3951
|
+
}]
|
|
3952
|
+
},
|
|
3953
|
+
},
|
|
3954
|
+
delaySubmitEvent: true,
|
|
3955
|
+
});
|
|
3956
|
+
|
|
3957
|
+
cd.submitFeatureEvent({
|
|
3958
|
+
name: 'client.feature.meeting.summary',
|
|
3959
|
+
options,
|
|
3960
|
+
payload: {
|
|
3961
|
+
meetingSummaryInfo: {
|
|
3962
|
+
featureName: 'syncSystemVideoStatus',
|
|
3963
|
+
featureActions: [{
|
|
3964
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
3965
|
+
actionId: '13400',
|
|
3966
|
+
isInitialValue: false,
|
|
3967
|
+
clickCount: '1'
|
|
3968
|
+
}]
|
|
3969
|
+
},
|
|
3970
|
+
},
|
|
3971
|
+
delaySubmitEvent: true,
|
|
3972
|
+
});
|
|
3973
|
+
|
|
3974
|
+
assert.notCalled(submitToCallFeaturesSpy);
|
|
3975
|
+
assert.calledTwice(submitFeatureEventSpy);
|
|
3976
|
+
submitFeatureEventSpy.resetHistory();
|
|
3977
|
+
|
|
3978
|
+
cd.submitDelayedClientFeatureEvents();
|
|
3979
|
+
|
|
3980
|
+
assert.calledTwice(submitFeatureEventSpy);
|
|
3981
|
+
assert.calledWith(submitFeatureEventSpy.firstCall, {
|
|
3982
|
+
name: 'client.feature.meeting.summary',
|
|
3983
|
+
payload: {
|
|
3984
|
+
meetingSummaryInfo: {
|
|
3985
|
+
featureName: 'syncSystemMuteStatus',
|
|
3986
|
+
featureActions: [{
|
|
3987
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
3988
|
+
actionId: '14200',
|
|
3989
|
+
isInitialValue: false,
|
|
3990
|
+
clickCount: '1'
|
|
3991
|
+
}]
|
|
3992
|
+
},
|
|
3993
|
+
},
|
|
3994
|
+
options: {
|
|
3995
|
+
meetingId: 'meetingId',
|
|
3996
|
+
triggeredTime: now.toISOString(),
|
|
3997
|
+
},
|
|
3998
|
+
});
|
|
3999
|
+
assert.calledWith(submitFeatureEventSpy.secondCall, {
|
|
4000
|
+
name: 'client.feature.meeting.summary',
|
|
4001
|
+
payload: {
|
|
4002
|
+
meetingSummaryInfo: {
|
|
4003
|
+
featureName: 'syncSystemVideoStatus',
|
|
4004
|
+
featureActions: [{
|
|
4005
|
+
actionName: 'syncMeetingVideoUnmuteStatusToSystem',
|
|
4006
|
+
actionId: '13400',
|
|
4007
|
+
isInitialValue: false,
|
|
4008
|
+
clickCount: '1'
|
|
4009
|
+
}]
|
|
4010
|
+
},
|
|
4011
|
+
},
|
|
4012
|
+
options: {
|
|
4013
|
+
meetingId: 'meetingId',
|
|
4014
|
+
triggeredTime: now.toISOString(),
|
|
4015
|
+
},
|
|
4016
|
+
});
|
|
4017
|
+
submitFeatureEventSpy.resetHistory();
|
|
4018
|
+
|
|
4019
|
+
cd.submitDelayedClientFeatureEvents();
|
|
4020
|
+
|
|
4021
|
+
// should not call submitFeatureEventSpy again if delayedClientFeatureEvents was cleared
|
|
4022
|
+
assert.notCalled(submitFeatureEventSpy);
|
|
4023
|
+
});
|
|
4024
|
+
});
|
|
3810
4025
|
});
|
|
3811
4026
|
});
|
|
@@ -327,6 +327,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
327
327
|
{
|
|
328
328
|
joinTimes: {
|
|
329
329
|
downloadTime: undefined,
|
|
330
|
+
pageJmt: undefined,
|
|
330
331
|
},
|
|
331
332
|
},
|
|
332
333
|
],
|
|
@@ -338,6 +339,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
338
339
|
meetingInfoReqResp: undefined,
|
|
339
340
|
refreshCaptchaServiceReqResp: undefined,
|
|
340
341
|
downloadIntelligenceModelsReqResp: undefined,
|
|
342
|
+
clickToInterstitialWithUserDelay: undefined,
|
|
341
343
|
},
|
|
342
344
|
},
|
|
343
345
|
],
|
|
@@ -366,6 +368,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
366
368
|
totalJmt: undefined,
|
|
367
369
|
clientJmt: undefined,
|
|
368
370
|
downloadTime: undefined,
|
|
371
|
+
clickToInterstitialWithUserDelay: undefined,
|
|
372
|
+
totalJMTWithUserDelay: undefined,
|
|
369
373
|
},
|
|
370
374
|
},
|
|
371
375
|
],
|
|
@@ -402,6 +406,8 @@ describe('internal-plugin-metrics', () => {
|
|
|
402
406
|
interstitialToMediaOKJMT: undefined,
|
|
403
407
|
callInitMediaEngineReady: undefined,
|
|
404
408
|
stayLobbyTime: undefined,
|
|
409
|
+
totalMediaJMTWithUserDelay: undefined,
|
|
410
|
+
totalJMTWithUserDelay: undefined,
|
|
405
411
|
},
|
|
406
412
|
},
|
|
407
413
|
],
|
|
@@ -19,7 +19,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
describe('check submitClientEvent when webex is not ready', () => {
|
|
22
|
+
describe('check submitClientEvent, submitFeatureEvent when webex is not ready', () => {
|
|
23
23
|
let webex;
|
|
24
24
|
//@ts-ignore
|
|
25
25
|
webex = mockWebex();
|
|
@@ -36,6 +36,30 @@ describe('internal-plugin-metrics', () => {
|
|
|
36
36
|
'NewMetrics: @submitClientEvent. Attempted to submit before webex.ready. Event name: client.alert.displayed'
|
|
37
37
|
);
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
it('checks the log', () => {
|
|
41
|
+
webex.internal.newMetrics.submitFeatureEvent({
|
|
42
|
+
name: 'client.feature.meeting.summary',
|
|
43
|
+
options: {
|
|
44
|
+
meetingId: '123',
|
|
45
|
+
},
|
|
46
|
+
payload: {
|
|
47
|
+
meetingSummaryInfo: {
|
|
48
|
+
featureName: 'syncSystemMuteStatus',
|
|
49
|
+
featureActions: [{
|
|
50
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
51
|
+
actionId: '14200',
|
|
52
|
+
isInitialValue: false,
|
|
53
|
+
clickCount: '1'
|
|
54
|
+
}]
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
assert.calledWith(
|
|
59
|
+
webex.logger.log,
|
|
60
|
+
'NewMetrics: @submitFeatureEvent. Attempted to submit before webex.ready. Event name: client.feature.meeting.summary'
|
|
61
|
+
);
|
|
62
|
+
});
|
|
39
63
|
});
|
|
40
64
|
|
|
41
65
|
describe('new-metrics contstructor', () => {
|
|
@@ -65,6 +89,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
65
89
|
webex.internal.newMetrics.callDiagnosticMetrics.buildClientEventFetchRequestOptions =
|
|
66
90
|
sinon.stub();
|
|
67
91
|
webex.setTimingsAndFetch = sinon.stub();
|
|
92
|
+
webex.internal.newMetrics.callDiagnosticMetrics.submitFeatureEvent = sinon.stub();
|
|
68
93
|
});
|
|
69
94
|
|
|
70
95
|
afterEach(() => {
|
|
@@ -104,7 +129,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
104
129
|
metadata: { foo: 'bar' },
|
|
105
130
|
});
|
|
106
131
|
});
|
|
107
|
-
|
|
132
|
+
|
|
108
133
|
it('submits Client Event successfully', () => {
|
|
109
134
|
webex.internal.newMetrics.submitClientEvent({
|
|
110
135
|
name: 'client.alert.displayed',
|
|
@@ -125,6 +150,46 @@ describe('internal-plugin-metrics', () => {
|
|
|
125
150
|
});
|
|
126
151
|
});
|
|
127
152
|
|
|
153
|
+
it('submits feature Event successfully', () => {
|
|
154
|
+
webex.internal.newMetrics.submitFeatureEvent({
|
|
155
|
+
name: 'client.feature.meeting.summary',
|
|
156
|
+
options: {
|
|
157
|
+
meetingId: '123',
|
|
158
|
+
},
|
|
159
|
+
payload: {
|
|
160
|
+
meetingSummaryInfo: {
|
|
161
|
+
featureName: 'syncSystemMuteStatus',
|
|
162
|
+
featureActions: [{
|
|
163
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
164
|
+
actionId: '14200',
|
|
165
|
+
isInitialValue: false,
|
|
166
|
+
clickCount: '1'
|
|
167
|
+
}]
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
assert.calledWith(webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp, {
|
|
173
|
+
key: 'client.feature.meeting.summary',
|
|
174
|
+
options: {meetingId: '123'},
|
|
175
|
+
});
|
|
176
|
+
assert.calledWith(webex.internal.newMetrics.callDiagnosticMetrics.submitFeatureEvent, {
|
|
177
|
+
name: 'client.feature.meeting.summary',
|
|
178
|
+
payload: {
|
|
179
|
+
meetingSummaryInfo: {
|
|
180
|
+
featureName: 'syncSystemMuteStatus',
|
|
181
|
+
featureActions: [{
|
|
182
|
+
actionName: 'syncMeetingMicUnmuteStatusToSystem',
|
|
183
|
+
actionId: '14200',
|
|
184
|
+
isInitialValue: false,
|
|
185
|
+
clickCount: '1'
|
|
186
|
+
}]
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
options: {meetingId: '123'},
|
|
190
|
+
delaySubmitEvent: false,
|
|
191
|
+
});
|
|
192
|
+
});
|
|
128
193
|
|
|
129
194
|
it('submits MQE successfully', () => {
|
|
130
195
|
webex.internal.newMetrics.submitMQE({
|
|
@@ -76,6 +76,7 @@ describe('internal-plugin-metrics', () => {
|
|
|
76
76
|
clickToInterstitial: undefined,
|
|
77
77
|
refreshCaptchaServiceReqResp: undefined,
|
|
78
78
|
downloadIntelligenceModelsReqResp: undefined,
|
|
79
|
+
clickToInterstitialWithUserDelay: undefined,
|
|
79
80
|
},
|
|
80
81
|
name: 'client.interstitial-window.launched',
|
|
81
82
|
},
|