@webex/plugin-meetings 3.3.1-next.14 → 3.3.1-next.16

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.
@@ -10,6 +10,7 @@ import testUtils from '../../../utils/testUtils';
10
10
  import {MEDIA_DEVICES, MQA_INTERVAL, _UNKNOWN_} from '@webex/plugin-meetings/src/constants';
11
11
  import LoggerProxy from '../../../../src/common/logs/logger-proxy';
12
12
  import LoggerConfig from '../../../../src/common/logs/logger-config';
13
+ import {CpuInfo} from '@webex/web-capabilities';
13
14
 
14
15
  const {assert} = chai;
15
16
 
@@ -2113,6 +2114,34 @@ describe('plugin-meetings', () => {
2113
2114
  }
2114
2115
  });
2115
2116
  });
2116
- });
2117
+
2118
+ describe('CPU Information Reporting', async () => {
2119
+ let getNumLogicalCoresStub;
2120
+
2121
+ beforeEach(async () => {
2122
+ getNumLogicalCoresStub = sinon.stub(CpuInfo, 'getNumLogicalCores');
2123
+ });
2124
+
2125
+ afterEach(() => {
2126
+ getNumLogicalCoresStub.restore();
2127
+ });
2128
+
2129
+ it('reports 1 of logical CPU cores when not available', async () => {
2130
+ getNumLogicalCoresStub.returns(undefined);
2131
+ await startStatsAnalyzer({pc, statsAnalyzer, mediaStatus: {expected: {receiveVideo: true}}});
2132
+
2133
+ await progressTime();
2134
+ assert.equal(mqeData.intervalMetadata.cpuInfo.numberOfCores, 1);
2135
+ });
2136
+
2137
+ it('reports the number of logical CPU cores', async () => {
2138
+ getNumLogicalCoresStub.returns(12);
2139
+ await startStatsAnalyzer({pc, statsAnalyzer, mediaStatus: {expected: {receiveVideo: true}}});
2140
+
2141
+ await progressTime();
2142
+ assert.equal(mqeData.intervalMetadata.cpuInfo.numberOfCores, 12);
2143
+ });
2144
+ });
2145
+ })
2117
2146
  });
2118
2147
  });