Global Metrics

path: .metrics.cyclomatic.average
old: 6.375
new: 1.0

path: .metrics.cyclomatic.sum
old: 51.0
new: 2.0

path: .metrics.cognitive.sum
old: 46.0
new: 0.0

path: .metrics.cognitive.average
old: 6.571428571428571
new: null

path: .metrics.loc.blank
old: 7.0
new: 17.0

path: .metrics.loc.lloc
old: 101.0
new: 0.0

path: .metrics.loc.cloc
old: 40.0
new: 63.0

path: .metrics.loc.ploc
old: 206.0
new: 113.0

path: .metrics.loc.sloc
old: 253.0
new: 193.0

path: .metrics.nargs.average
old: 2.7142857142857144
new: null

path: .metrics.nargs.sum
old: 19.0
new: 0.0

path: .metrics.nexits.average
old: 0.5714285714285714
new: null

path: .metrics.nexits.sum
old: 4.0
new: 0.0

path: .metrics.mi.mi_original
old: 22.927979536311017
new: 43.53938224887972

path: .metrics.mi.mi_sei
old: -8.541516472681337
new: 26.01607038425993

path: .metrics.mi.mi_visual_studio
old: 13.408175167433342
new: 25.46162704612849

path: .metrics.halstead.length
old: 1067.0
new: 407.0

path: .metrics.halstead.n2
old: 140.0
new: 181.0

path: .metrics.halstead.N1
old: 609.0
new: 204.0

path: .metrics.halstead.bugs
old: 1.9723770068609765
new: 0.12052850059626388

path: .metrics.halstead.time
old: 25286.823287478423
new: 381.9829758436576

path: .metrics.halstead.N2
old: 458.0
new: 203.0

path: .metrics.halstead.volume
old: 7950.442256325095
new: 3065.272254430139

path: .metrics.halstead.effort
old: 455162.8191746117
new: 6875.693565185837

path: .metrics.halstead.vocabulary
old: 175.0
new: 185.0

path: .metrics.halstead.n1
old: 35.0
new: 4.0

path: .metrics.halstead.level
old: 0.017467248908296942
new: 0.4458128078817734

path: .metrics.halstead.difficulty
old: 57.25
new: 2.2430939226519335

path: .metrics.halstead.estimated_program_length
old: 1177.624527965369
new: 1365.4721055620605

path: .metrics.halstead.purity_ratio
old: 1.1036780955626702
new: 3.3549683183343006

path: .metrics.nom.total
old: 7.0
new: 0.0

path: .metrics.nom.functions
old: 7.0
new: 0.0

Spaces Data

Minimal test - lines (44, 191)

path: .spaces[0].metrics.cognitive.average
old: 0.0
new: null

path: .spaces[0].metrics.nexits.average
old: 0.0
new: null

path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 0.0

path: .spaces[0].metrics.nargs.average
old: 2.0
new: null

path: .spaces[0].metrics.mi.mi_original
old: 99.46319508643197
new: 48.13779385856006

path: .spaces[0].metrics.mi.mi_visual_studio
old: 58.16561116165612
new: 28.150756642432786

path: .spaces[0].metrics.mi.mi_sei
old: 113.26059280906034
new: 25.04850576457293

path: .spaces[0].metrics.halstead.n1
old: 8.0
new: 4.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.5239792311686402
new: 3.3217879670273422

path: .spaces[0].metrics.halstead.N1
old: 33.0
new: 204.0

path: .spaces[0].metrics.halstead.bugs
old: 0.055916281720231886
new: 0.11923371597442314

path: .spaces[0].metrics.halstead.vocabulary
old: 26.0
new: 182.0

path: .spaces[0].metrics.halstead.volume
old: 305.52858167917094
new: 3025.6412400000745

path: .spaces[0].metrics.halstead.difficulty
old: 7.111111111111111
new: 2.235955056179775

path: .spaces[0].metrics.halstead.time
old: 120.70264955226506
new: 375.844323820234

path: .spaces[0].metrics.halstead.length
old: 65.0
new: 403.0

path: .spaces[0].metrics.halstead.effort
old: 2172.647691940771
new: 6765.197828764211

path: .spaces[0].metrics.halstead.estimated_program_length
old: 99.0586500259616
new: 1338.6805507120189

path: .spaces[0].metrics.halstead.level
old: 0.140625
new: 0.4472361809045226

path: .spaces[0].metrics.halstead.N2
old: 32.0
new: 199.0

path: .spaces[0].metrics.halstead.n2
old: 18.0
new: 178.0

path: .spaces[0].metrics.loc.lloc
old: 2.0
new: 0.0

path: .spaces[0].metrics.loc.ploc
old: 9.0
new: 108.0

path: .spaces[0].metrics.loc.sloc
old: 13.0
new: 148.0

path: .spaces[0].metrics.loc.blank
old: 0.0
new: 12.0

path: .spaces[0].metrics.loc.cloc
old: 7.0
new: 28.0

path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0

path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0

Code

namespace lul {

// These enums do not follow the google3 style only because they are
// known universally (specs, other implementations) by the names in
// exactly this capitalization.
// Tag names and codes.

// Call Frame Info instructions.
enum DwarfCFI {
  DW_CFA_advance_loc = 0x40,
  DW_CFA_offset = 0x80,
  DW_CFA_restore = 0xc0,
  DW_CFA_nop = 0x00,
  DW_CFA_set_loc = 0x01,
  DW_CFA_advance_loc1 = 0x02,
  DW_CFA_advance_loc2 = 0x03,
  DW_CFA_advance_loc4 = 0x04,
  DW_CFA_offset_extended = 0x05,
  DW_CFA_restore_extended = 0x06,
  DW_CFA_undefined = 0x07,
  DW_CFA_same_value = 0x08,
  DW_CFA_register = 0x09,
  DW_CFA_remember_state = 0x0a,
  DW_CFA_restore_state = 0x0b,
  DW_CFA_def_cfa = 0x0c,
  DW_CFA_def_cfa_register = 0x0d,
  DW_CFA_def_cfa_offset = 0x0e,
  DW_CFA_def_cfa_expression = 0x0f,
  DW_CFA_expression = 0x10,
  DW_CFA_offset_extended_sf = 0x11,
  DW_CFA_def_cfa_sf = 0x12,
  DW_CFA_def_cfa_offset_sf = 0x13,
  DW_CFA_val_offset = 0x14,
  DW_CFA_val_offset_sf = 0x15,
  DW_CFA_val_expression = 0x16,

  // Opcodes in this range are reserved for user extensions.
  DW_CFA_lo_user = 0x1c,
  DW_CFA_hi_user = 0x3f,

  // SGI/MIPS specific.
  DW_CFA_MIPS_advance_loc8 = 0x1d,

  // GNU extensions.
  DW_CFA_GNU_window_save = 0x2d,
  DW_CFA_GNU_args_size = 0x2e,
  DW_CFA_GNU_negative_offset_extended = 0x2f
};

// Exception handling 'z' augmentation letters.
enum DwarfZAugmentationCodes {
  // If the CFI augmentation string begins with 'z', then the CIE and FDE
  // have an augmentation data area just before the instructions, whose
  // contents are determined by the subsequent augmentation letters.
  DW_Z_augmentation_start = 'z',

  // If this letter is present in a 'z' augmentation string, the CIE
  // augmentation data includes a pointer encoding, and the FDE
  // augmentation data includes a language-specific data area pointer,
  // represented using that encoding.
  DW_Z_has_LSDA = 'L',

  // If this letter is present in a 'z' augmentation string, the CIE
  // augmentation data includes a pointer encoding, followed by a pointer
  // to a personality routine, represented using that encoding.
  DW_Z_has_personality_routine = 'P',

  // If this letter is present in a 'z' augmentation string, the CIE
  // augmentation data includes a pointer encoding describing how the FDE's
  // initial location, address range, and DW_CFA_set_loc operands are
  // encoded.
  DW_Z_has_FDE_address_encoding = 'R',

  // If this letter is present in a 'z' augmentation string, then code
  // addresses covered by FDEs that cite this CIE are signal delivery
  // trampolines. Return addresses of frames in trampolines should not be
  // adjusted as described in section 6.4.4 of the DWARF 3 spec.
  DW_Z_is_signal_trampoline = 'S'
};

// Expression opcodes
enum DwarfExpressionOpcodes {
  DW_OP_addr = 0x03,
  DW_OP_deref = 0x06,
  DW_OP_const1s = 0x09,
  DW_OP_const2u = 0x0a,
  DW_OP_const2s = 0x0b,
  DW_OP_const4u = 0x0c,
  DW_OP_const4s = 0x0d,
  DW_OP_const8u = 0x0e,
  DW_OP_const8s = 0x0f,
  DW_OP_constu = 0x10,
  DW_OP_consts = 0x11,
  DW_OP_dup = 0x12,
  DW_OP_drop = 0x13,
  DW_OP_over = 0x14,
  DW_OP_pick = 0x15,
  DW_OP_swap = 0x16,
  DW_OP_rot = 0x17,
  DW_OP_xderef = 0x18,
  DW_OP_abs = 0x19,
  DW_OP_and = 0x1a,
  DW_OP_div = 0x1b,
  DW_OP_minus = 0x1c,
  DW_OP_mod = 0x1d,
  DW_OP_mul = 0x1e,
  DW_OP_neg = 0x1f,
  DW_OP_not = 0x20,
  DW_OP_or = 0x21,
  DW_OP_plus = 0x22,
  DW_OP_plus_uconst = 0x23,
  DW_OP_shl = 0x24,
  DW_OP_shr = 0x25,
  DW_OP_shra = 0x26,
  DW_OP_xor = 0x27,
  DW_OP_skip = 0x2f,
  DW_OP_bra = 0x28,
  DW_OP_eq = 0x29,
  DW_OP_ge = 0x2a,
  DW_OP_gt = 0x2b,
  DW_OP_le = 0x2c,
  DW_OP_lt = 0x2d,
  DW_OP_ne = 0x2e,
  DW_OP_lit0 = 0x30,
  DW_OP_lit31 = 0x4f,
  DW_OP_reg0 = 0x50,
  DW_OP_reg31 = 0x6f,
  DW_OP_breg0 = 0x70,
  DW_OP_breg31 = 0x8f,
  DW_OP_regx = 0x90,
  DW_OP_fbreg = 0x91,
  DW_OP_bregx = 0x92,
  DW_OP_piece = 0x93,
  DW_OP_deref_size = 0x94,
  DW_OP_xderef_size = 0x95,
  DW_OP_nop = 0x96,
  DW_OP_push_object_address = 0x97,
  DW_OP_call2 = 0x98,
  DW_OP_call4 = 0x99,
  DW_OP_call_ref = 0x9a,
  DW_OP_form_tls_address = 0x9b,
  DW_OP_call_frame_cfa = 0x9c,
  DW_OP_bit_piece = 0x9d,
  DW_OP_lo_user = 0xe0,
  DW_OP_hi_user = 0xff
};

}  // namespace lul