...

Text file src/cuelang.org/go/cue/testdata/benchmarks/issue1684.txtar

Documentation: cuelang.org/go/cue/testdata/benchmarks

     1#Issue: 1684
     2
     3// TODO: significantly reduce the number of counts in this evaluation.
     4-- stats.txt --
     5Leaks:  0
     6Freed:  995025
     7Reused: 994976
     8Allocs: 49
     9Retain: 0
    10
    11Unifications: 740771
    12Conjuncts:    3143640
    13Disjuncts:    995025
    14
    15-- in.cue --
    16#Secret: {
    17	$secret: id: string
    18}
    19#secrets: #Secret | {[string]: #secrets}
    20
    21out: #secrets & {
    22	FOO: $secret: id: "100"
    23	ONE: TWO: THREE: $secret: id: "123"
    24}
    25
    26#Secret: {
    27	$secret: _id: string
    28}
    29#secrets: #Secret | {[string]: #secrets}
    30
    31out: #secrets & {
    32	FOO: $secret: _id: "100"
    33	ONE: TWO: THREE: $secret: _id: "123"
    34}
    35-- out/eval/stats --
    36Leaks:  0
    37Freed:  1064043
    38Reused: 1063992
    39Allocs: 51
    40Retain: 0
    41
    42Unifications: 791999
    43Conjuncts:    2479541
    44Disjuncts:    1064043
    45-- out/eval --
    46(struct){
    47  #Secret: (#struct){
    48    $secret: (#struct){
    49      id: (string){ string }
    50      _id: (string){ string }
    51    }
    52  }
    53  #secrets: (#struct){ |((#struct){
    54      $secret: (#struct){
    55        id: (string){ string }
    56        _id: (string){ string }
    57      }
    58    }, (#struct){
    59    }) }
    60  out: (#struct){
    61    FOO: (#struct){
    62      $secret: (#struct){
    63        id: (string){ "100" }
    64        _id: (string){ "100" }
    65      }
    66    }
    67    ONE: (#struct){
    68      TWO: (#struct){
    69        THREE: (#struct){
    70          $secret: (#struct){
    71            id: (string){ "123" }
    72            _id: (string){ "123" }
    73          }
    74        }
    75      }
    76    }
    77  }
    78}
    79-- out/compile --
    80--- in.cue
    81{
    82  #Secret: {
    83    $secret: {
    84      id: string
    85    }
    86  }
    87  #secrets: (〈0;#Secret〉|{
    88    [string]: 〈1;#secrets〉
    89  })
    90  out: (〈0;#secrets〉 & {
    91    FOO: {
    92      $secret: {
    93        id: "100"
    94      }
    95    }
    96    ONE: {
    97      TWO: {
    98        THREE: {
    99          $secret: {
   100            id: "123"
   101          }
   102        }
   103      }
   104    }
   105  })
   106  #Secret: {
   107    $secret: {
   108      _id: string
   109    }
   110  }
   111  #secrets: (〈0;#Secret〉|{
   112    [string]: 〈1;#secrets〉
   113  })
   114  out: (〈0;#secrets〉 & {
   115    FOO: {
   116      $secret: {
   117        _id: "100"
   118      }
   119    }
   120    ONE: {
   121      TWO: {
   122        THREE: {
   123          $secret: {
   124            _id: "123"
   125          }
   126        }
   127      }
   128    }
   129  })
   130}

View as plain text