awslabs / amazon-polly-tts-for-windows
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 39 units with 1,067 lines of code in units (43.5% of code).
    • 3 very long units (359 lines of code)
    • 7 long units (453 lines of code)
    • 1 medium size units (41 lines of code)
    • 7 small units (106 lines of code)
    • 21 very small units (108 lines of code)
33% | 42% | 3% | 9% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp37% | 40% | 4% | 9% | 7%
cs0% | 58% | 0% | 14% | 26%
c0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
PollyTTSEngine38% | 44% | 0% | 7% | 9%
installvoices36% | 32% | 12% | 12% | 5%
PollyPlayer0% | 58% | 0% | 14% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
HRESULT CTTSEngObj::OutputSentence()
in PollyTTSEngine/ttsengobj.cpp
133 19 2
std::pair VoiceForSAPI::GetVoiceHexValue()
in installvoices/VoiceForSapi.cpp
124 29 1
BOOL CTTSEngObj::AddNextSentenceItem()
in PollyTTSEngine/ttsengobj.cpp
102 12 1
STDMETHODIMP CTTSEngObj::Speak()
in PollyTTSEngine/ttsengobj.cpp
83 13 5
74 5 2
private void InitializeComponent()
in PollyPlayer/Form1.Designer.cs
68 1 0
voice_map_t SelectedVoicesMap()
in installvoices/InstallVoices.cpp
60 12 1
HRESULT CTTSEngObj::GetNextSentence()
in PollyTTSEngine/ttsengobj.cpp
59 9 1
PollySpeechResponse PollyManager::GenerateSpeech()
in PollyTTSEngine/PollyManager.cpp
58 8 1
int AddVoice()
in installvoices/InstallVoices.cpp
51 13 1
int wmain()
in installvoices/InstallVoices.cpp
41 9 2
std::string PollyManager::ParseXMLOutput()
in PollyTTSEngine/PollyManager.cpp
20 5 1
private void LoadVoices()
in PollyPlayer/Form1.cs
17 4 0
HRESULT CTTSEngObj::FinalConstruct()
in PollyTTSEngine/ttsengobj.cpp
15 1 0
int RemoveVoice()
in installvoices/InstallVoices.cpp
15 2 1
argument_set_t ArgumentSet()
in installvoices/InstallVoices.cpp
14 3 1
void VoiceForSAPI::PrintVoice()
in installvoices/VoiceForSapi.cpp
13 1 0
BOOL SearchSet()
in PollyTTSEngine/ttsengobj.cpp
12 3 4
private void SayItButton_Click()
in PollyPlayer/Form1.cs
9 1 2
STDMETHODIMP CTTSEngObj::SetObjectToken()
in PollyTTSEngine/ttsengobj.cpp
9 1 1