aws-samples / aws-serverless-airline-booking
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 52 units with 706 lines of code in units (11.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (95 lines of code)
    • 10 medium size units (264 lines of code)
    • 12 small units (217 lines of code)
    • 29 very small units (130 lines of code)
0% | 13% | 37% | 30% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 30% | 26% | 23% | 19%
py0% | 0% | 44% | 39% | 16%
ts0% | 0% | 63% | 0% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/frontend0% | 90% | 0% | 0% | 9%
src/backend/booking0% | 0% | 56% | 36% | 7%
src/frontend/src0% | 0% | 40% | 35% | 24%
src/backend/payment0% | 0% | 55% | 39% | 6%
src/backend/loyalty0% | 0% | 63% | 0% | 36%
src/backend/catalog0% | 0% | 0% | 69% | 30%
src/backend/shared0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
module.exports = function()
in src/frontend/quasar.conf.js
95 1 0
export async function processPayment()
in src/frontend/src/store/bookings/payment.js
36 3 3
def notify_booking()
in src/backend/booking/src/notify-booking/notify.py
31 5 2
def collect_payment()
in src/backend/payment/src/collect-payment/collect.py
29 3 1
def reserve_booking()
in src/backend/booking/src/reserve-booking/reserve.py
28 2 1
def confirm_booking()
in src/backend/booking/src/confirm-booking/confirm.py
27 2 1
def refund_payment()
in src/backend/payment/src/refund-payment/refund.py
26 3 1
export default function()
in src/frontend/src/router/index.js
24 4 0
$airportSearch_fuzzySearch()
in src/frontend/src/shared/mixins/airportSearch.js
21 5 3
def lambda_handler()
in src/backend/booking/src/notify-booking/notify.py
21 4 2
export async function handler()
in src/backend/loyalty/src/ingest/index.ts
21 4 2
export async function fetchLoyalty()
in src/frontend/src/store/loyalty/actions.js
20 2 1
def lambda_handler()
in src/backend/payment/src/collect-payment/collect.py
20 4 2
export async function fetchByFlightId()
in src/frontend/src/store/catalog/actions.js
19 2 2
def reserve_seat_on_flight()
in src/backend/catalog/src/reserve-flight/reserve.py
19 4 1
def lambda_handler()
in src/backend/payment/src/refund-payment/refund.py
19 3 2
def lambda_handler()
in src/backend/booking/src/confirm-booking/confirm.py
18 3 2
def reserve_seat_on_flight()
in src/backend/catalog/src/release-flight/release.py
18 4 1
export async function getSession()
in src/frontend/src/store/profile/actions.js
17 4 2
def cancel_booking()
in src/backend/booking/src/cancel-booking/cancel.py
17 2 1