microsoft / cognitive-services-speech-sdk-js
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,324 units with 10,696 lines of code in units (61.6% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (928 lines of code)
    • 17 medium complex units (1,176 lines of code)
    • 48 simple units (1,257 lines of code)
    • 1,254 very simple units (7,335 lines of code)
0% | 8% | 10% | 11% | 68%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 8% | 10% | 11% | 68%
js0% | 0% | 33% | 0% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sdk/Audio0% | 30% | 3% | 11% | 54%
src/common.speech0% | 10% | 22% | 13% | 53%
src/common.speech/Transcription0% | 19% | 7% | 8% | 64%
src/common.browser0% | 0% | 16% | 21% | 61%
src/sdk0% | 0% | 3% | 5% | 90%
src/sdk/Transcription0% | 0% | 6% | 15% | 77%
ci0% | 0% | 91% | 0% | 8%
src/common0% | 0% | 4% | 20% | 75%
src/common.speech/ServiceMessages0% | 0% | 0% | 8% | 91%
ROOT0% | 0% | 0% | 0% | 100%
src/audioworklet0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private async receiveConversationMessageOverride()
in src/common.speech/Transcription/ConversationServiceAdapter.ts
215 47 0
private getSpeechRegionFromIntentRegion()
in src/common.speech/IntentConnectionFactory.ts
54 37 1
public static fromSpeechSynthesisOutputFormatString()
in src/sdk/Audio/AudioOutputFormat.ts
390 36 1
protected async receiveMessage()
in src/common.speech/SynthesisAdapterBase.ts
135 35 0
protected async processTypeSpecificMessages()
in src/common.speech/TranslationServiceRecognizer.ts
134 31 1
(function ()()
in ci/version.js
57 25 1
private receiveDialogMessageOverride()
in src/common.speech/DialogServiceAdapter.ts
97 25 0
protected async receiveMessage()
in src/common.speech/ServiceRecognizerBase.ts
79 23 0
protected async processTypeSpecificMessages()
in src/common.speech/IntentServiceRecognizer.ts
120 22 1
protected async processTypeSpecificMessages()
in src/common.speech/DialogServiceAdapter.ts
100 19 1
protected async sendAudio()
in src/common.speech/ServiceRecognizerBase.ts
60 17 1
protected async processTypeSpecificMessages()
in src/common.speech/SpeechServiceRecognizer.ts
102 17 1
public createOrJoin()
in src/common.speech/Transcription/ConversationManager.ts
84 16 4
protected async processTypeSpecificMessages()
in src/common.speech/TranscriptionServiceRecognizer.ts
102 16 1
public close()
in src/sdk/Audio/SpeakerAudioDestination.ts
46 16 1
public constructor()
in src/common.browser/WebsocketConnection.ts
47 14 7
public constructor()
in src/common.speech/ServiceRecognizerBase.ts
50 14 5
public constructor()
in src/common/ConnectionMessage.ts
23 12 4
public joinConversationAsync()
in src/sdk/Transcription/ConversationTranslator.ts
66 12 5
private static async GetResponseFromCache()
in src/common.browser/CertChecks.ts
53 11 3