Global Metrics

path: .metrics.halstead.bugs
old: 0.08731564799083939
new: 0.08935569576942648

path: .metrics.halstead.volume
old: 508.7462841250339
new: 513.8337469662843

path: .metrics.halstead.effort
old: 4239.552367708617
new: 4388.996588670344

path: .metrics.halstead.time
old: 235.5306870949231
new: 243.8331438150191

path: .metrics.halstead.length
old: 100.0
new: 101.0

path: .metrics.halstead.level
old: 0.12
new: 0.11707317073170732

path: .metrics.halstead.purity_ratio
old: 1.4325838096618135
new: 1.41839981154635

path: .metrics.halstead.difficulty
old: 8.333333333333334
new: 8.541666666666666

path: .metrics.halstead.N2
old: 40.0
new: 41.0

path: .metrics.mi.mi_sei
old: 61.26534703043607
new: 61.19069950695529

path: .metrics.mi.mi_visual_studio
old: 42.99315070135155
new: 42.96289238530683

path: .metrics.mi.mi_original
old: 73.51828769931114
new: 73.46654597887468

Spaces Data

Minimal test - lines (8, 51)

path: .spaces[0].metrics.mi.mi_original
old: 76.38855369764926
new: 76.33521989677988

path: .spaces[0].metrics.mi.mi_visual_studio
old: 44.67166882903465
new: 44.64047947180109

path: .spaces[0].metrics.mi.mi_sei
old: 59.95447039619942
new: 59.8775259861734

path: .spaces[0].metrics.halstead.level
old: 0.11578947368421053
new: 0.11282051282051282

path: .spaces[0].metrics.halstead.effort
old: 4188.636363636364
new: 4343.181818181818

path: .spaces[0].metrics.halstead.difficulty
old: 8.636363636363637
new: 8.863636363636363

path: .spaces[0].metrics.halstead.bugs
old: 0.08661514786008066
new: 0.08873277948339905

path: .spaces[0].metrics.halstead.N2
old: 38.0
new: 39.0

path: .spaces[0].metrics.halstead.length
old: 97.0
new: 98.0

path: .spaces[0].metrics.halstead.volume
old: 485.0
new: 490.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.3538842944215892
new: 1.3400691485601444

path: .spaces[0].metrics.halstead.time
old: 232.7020202020202
new: 241.2878787878788

Code

define(function(require, exports, module) {
  // Dependencies
  const { span } = require("devtools/client/shared/vendor/react-dom-factories");

  const PropTypes = require("devtools/client/shared/vendor/react-prop-types");

  const {
    getGripType,
    wrapRender,
  } = require("devtools/client/shared/components/reps/reps/rep-utils");

  /**
   * Renders a NaN object
   */

  NaNRep.PropTypes = {
    shouldRenderTooltip: PropTypes.bool,
  };

  function NaNRep(props) {
    const shouldRenderTooltip = props.shouldRenderTooltip;

    const config = getElementConfig(shouldRenderTooltip);

    return span(config, "NaN");
  }

  function getElementConfig(shouldRenderTooltip) {
    return {
      className: "objectBox objectBox-nan",
      title: shouldRenderTooltip ? "NaN" : null,
    };
  }

  function supportsObject(object, noGrip = false) {
    return getGripType(object, noGrip) == "NaN";
  }

  // Exports from this module
  module.exports = {
    rep: wrapRender(NaNRep),
    supportsObject,
  };
});

Minimal test - lines (42, 44)

path: .spaces[0].spaces[2].metrics.mi.mi_sei
old: 115.19959464458498
new: 114.71542574174929

path: .spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 77.34007614346245
new: 77.14381865228387

path: .spaces[0].spaces[2].metrics.mi.mi_original
old: 132.2515302053208
new: 131.9159298954054

path: .spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 2.067970000576925
new: 1.938721875540867

path: .spaces[0].spaces[2].metrics.halstead.difficulty
old: 3.5
new: 4.0

path: .spaces[0].spaces[2].metrics.halstead.effort
old: 188.2105312878607
new: 229.437600046154

path: .spaces[0].spaces[2].metrics.halstead.bugs
old: 0.010947325359591292
new: 0.012492666300851833

path: .spaces[0].spaces[2].metrics.halstead.length
old: 15.0
new: 16.0

path: .spaces[0].spaces[2].metrics.halstead.level
old: 0.2857142857142857
new: 0.25

path: .spaces[0].spaces[2].metrics.halstead.time
old: 10.456140627103371
new: 12.746533335897444

path: .spaces[0].spaces[2].metrics.halstead.N2
old: 7.0
new: 8.0

path: .spaces[0].spaces[2].metrics.halstead.volume
old: 53.77443751081734
new: 57.3594000115385

Code

  function supportsObject(object, noGrip = false) {
    return getGripType(object, noGrip) == "NaN";
  }