225d31587eeb9aca226158e346c8e9730777913c,perfkitbenchmarker/publisher.py,,RepublishJSONSamples,#Any#,763

Before Change


        // labels is a comma-seprated list of key, value pairs
        for pair in labels.split(","):
          // Need to strip leading and trailing "|" from each pair
          key, _, value = pair[1:-1].partition(":")
          metadata[key] = value
        raw_dict["metadata"] = metadata
        samples.append(raw_dict)
      except Exception as e:

After Change


    fields = sample.pop("labels")[1:-1].split("|,|")
    // Turn the fields into [[key, value], ...]
    key_values = [field.split(":", 1) for field in fields]
    sample["metadata"] = {k: v for k, v in key_values}

  // We can"t use a SampleCollector because SampleCollector.AddSamples depends on
  // having a benchmark and a benchmark_spec.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 225d31587eeb9aca226158e346c8e9730777913c
Time: 2017-02-24
Author: nlavine@google.com
File Name: perfkitbenchmarker/publisher.py
Class Name:
Method Name: RepublishJSONSamples


Project Name: pantsbuild/pants
Commit Name: 67925858cd5cdb1ec770c4e9aeeff288c80456fc
Time: 2016-09-18
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/jvm/tasks/junit_run.py
Class Name: JUnitRun
Method Name: _collect_test_targets


Project Name: lingpy/lingpy
Commit Name: 7e19f09445a7c3ae51428a9637259a9805958f9f
Time: 2013-04-04
Author: bambooforest@gmail.com
File Name: lingpy/compare/matrix.py
Class Name: Matrix
Method Name: _get_words_ngrams