# Global Metrics

path: .metrics.cyclomatic.sum
old: 41.0
new: 4.0
path: .metrics.cyclomatic.average
old: 1.3225806451612905
new: 1.0
path: .metrics.nom.total
old: 15.0
new: 0.0
path: .metrics.nom.functions
old: 15.0
new: 0.0
path: .metrics.cognitive.average
old: 0.4666666666666667
new: null
path: .metrics.cognitive.sum
old: 7.0
new: 0.0
path: .metrics.halstead.N1
old: 486.0
new: 26.0
path: .metrics.halstead.length
old: 955.0
new: 38.0
path: .metrics.halstead.effort
old: 258910.33743001145
new: 605.0182093001755
path: .metrics.halstead.difficulty
old: 34.69642857142857
new: 3.8181818181818183
path: .metrics.halstead.estimated_program_length
old: 1633.3645783052802
new: 57.70523225941349
path: .metrics.halstead.volume
old: 7462.161037612271
new: 158.45715005480787
path: .metrics.halstead.time
old: 14383.907635000636
new: 33.61212273889864
path: .metrics.halstead.level
old: 0.028821410190427176
new: 0.2619047619047619
path: .metrics.halstead.n1
old: 29.0
new: 7.0
path: .metrics.halstead.vocabulary
old: 225.0
new: 18.0
path: .metrics.halstead.purity_ratio
old: 1.7103294013667856
new: 1.5185587436687762
path: .metrics.halstead.bugs
old: 1.3540821271089414
new: 0.023844654964826167
path: .metrics.halstead.n2
old: 196.0
new: 11.0
path: .metrics.halstead.N2
old: 469.0
new: 12.0
path: .metrics.nexits.average
old: 1.0
new: null
path: .metrics.nexits.sum
old: 15.0
new: 0.0
path: .metrics.nargs.sum
old: 29.0
new: 0.0
path: .metrics.nargs.average
old: 1.9333333333333331
new: null
path: .metrics.mi.mi_sei
old: -14.263643062354234
new: 90.50346375166131
path: .metrics.mi.mi_visual_studio
old: 12.839447017607371
new: 50.37593187795377
path: .metrics.mi.mi_original
old: 21.955454400108607
new: 86.14284351130094
path: .metrics.loc.cloc
old: 38.0
new: 14.0
path: .metrics.loc.lloc
old: 23.0
new: 0.0
path: .metrics.loc.blank
old: 67.0
new: 5.0
path: .metrics.loc.ploc
old: 211.0
new: 16.0
path: .metrics.loc.sloc
old: 316.0
new: 35.0

# Spaces Data

## Minimal test - lines (10, 33)

path: .spaces[0].metrics.cognitive.average
old: 1.0
new: null
path: .spaces[0].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 3.0
new: 13.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 3.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 8.0
path: .spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 3.0
new: 24.0
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 3.0
path: .spaces[0].metrics.halstead.bugs
old: 0.01406638992471609
new: 0.021417148784745745
path: .spaces[0].metrics.halstead.vocabulary
old: 14.0
new: 17.0
path: .spaces[0].metrics.halstead.n2
old: 7.0
new: 10.0
path: .spaces[0].metrics.halstead.length
old: 16.0
new: 36.0
path: .spaces[0].metrics.halstead.level
old: 0.2222222222222222
new: 0.2857142857142857
path: .spaces[0].metrics.halstead.N2
old: 9.0
new: 10.0
path: .spaces[0].metrics.halstead.N1
old: 7.0
new: 26.0
path: .spaces[0].metrics.halstead.time
old: 15.229419688230417
new: 28.612239888752377
path: .spaces[0].metrics.halstead.difficulty
old: 4.5
new: 3.5
path: .spaces[0].metrics.halstead.purity_ratio
old: 2.4564355568004035
new: 1.4686323723132455
path: .spaces[0].metrics.halstead.effort
old: 274.1295543881475
new: 515.0203179975427
path: .spaces[0].metrics.halstead.volume
old: 60.91767875292167
new: 147.14866228501222
path: .spaces[0].metrics.halstead.estimated_program_length
old: 39.302968908806456
new: 52.87076540327685
path: .spaces[0].metrics.mi.mi_sei
old: 114.03390435362245
new: 97.58026080070124
path: .spaces[0].metrics.mi.mi_original
old: 131.3729591182628
new: 92.870022352538
path: .spaces[0].metrics.mi.mi_visual_studio
old: 76.82629188202503
new: 54.30995459212748
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 1.0
new: null

### Code

    namespace mozilla {
    namespace ipc {

    /*
     * Exposed environment variables:
     * SHMEM_FUZZER_ENABLE=1
     * SHMEM_FUZZER_ENABLE_LOGGING=1       (optional)
     * SHMEM_FUZZER_MUTATION_PROBABILITY=2 (optional)
     * SHMEM_FUZZER_MUTATION_FACTOR=500    (optional)
     */

    class SharedMemoryFuzzer {
     public:
      static void* MutateSharedMemory(void* aMemory, size_t aSize);

     private:
      static uint64_t MutationProbability();
      static uint64_t MutationFactor();
      static bool IsEnabled();
      static bool IsLoggingEnabled();
    };

    }  // namespace ipc
    }  // namespace mozilla