awslabs / privacy-preserving-xgboost-inference
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 43 units with 237 lines of code in units (86.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (37 lines of code)
    • 2 small units (32 lines of code)
    • 40 very small units (168 lines of code)
0% | 0% | 15% | 13% | 70%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 15% | 13% | 70%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/ppxgboost0% | 0% | 15% | 13% | 70%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def parse_node_in_tree()
in src/ppxgboost/BoosterParser.py
37 23 4
def enc_input_vector()
in src/ppxgboost/PPBooster.py
19 9 5
def enc_tree_node()
in src/ppxgboost/PPBooster.py
13 6 5
def predict_single_input_multiclass()
in src/ppxgboost/PPBooster.py
9 5 3
def client_side_multiclass_compute()
in src/ppxgboost/PPBooster.py
9 5 1
def client_decrypt_prediction_multiclass()
in src/ppxgboost/PPBooster.py
9 3 2
def node_to_string()
in src/ppxgboost/BoosterParser.py
9 2 2
def model_to_trees()
in src/ppxgboost/BoosterParser.py
8 4 2
def enc_xgboost_model()
in src/ppxgboost/PPBooster.py
7 2 3
def __init__()
in src/ppxgboost/BoosterParser.py
7 1 7
def eval()
in src/ppxgboost/BoosterParser.py
7 3 2
def ciphertext_deserialization()
in src/ppxgboost/PaillierAPI.py
7 1 1
def hmac_feature()
in src/ppxgboost/PPBooster.py
6 2 2
def predict_single_input_binary()
in src/ppxgboost/PPBooster.py
6 2 3
def predict_multiclass()
in src/ppxgboost/PPBooster.py
6 2 3
def predict_binary()
in src/ppxgboost/PPBooster.py
5 3 3
def node_to_string()
in src/ppxgboost/BoosterParser.py
5 2 2
def ciphertext_serialization()
in src/ppxgboost/PaillierAPI.py
5 1 2
def hmac_msg()
in src/ppxgboost/PPBooster.py
4 1 2
def __init__()
in src/ppxgboost/PPKey.py
4 1 4