204147309d829f5a1d4ac499acfd7941dad21523,perfkitbenchmarker/publisher.py,DefaultMetadataProvider,AddMetadata,#DefaultMetadataProvider#Any#Any#,137

Before Change


    // Flatten all user metadata into a single list (since each string in the
    // FLAGS.metadata can actually be several key-value pairs) and then iterate
    // over it.
    for pair in [kv for item in FLAGS.metadata for kv in item.split(",")]:
      try:
        key, value = pair.split(":")
        metadata[key] = value
      except ValueError:
        logging.error("Bad metadata flag format. Skipping "%s".", pair)
        continue

    return metadata


DEFAULT_METADATA_PROVIDERS = [DefaultMetadataProvider()]

After Change


    // FLAGS.metadata can actually be several key-value pairs) and then iterate
    // over it.
    parsed_metadata = flag_util.ParseKeyValuePairs(FLAGS.metadata)
    metadata.update(parsed_metadata)
    return metadata


DEFAULT_METADATA_PROVIDERS = [DefaultMetadataProvider()]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 204147309d829f5a1d4ac499acfd7941dad21523
Time: 2016-03-17
Author: wonderfly@google.com
File Name: perfkitbenchmarker/publisher.py
Class Name: DefaultMetadataProvider
Method Name: AddMetadata


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: f8d8b3f1a9d8c315977cfbf53785cbbeaf8be94c
Time: 2016-03-10
Author: wonderfly@google.com
File Name: perfkitbenchmarker/publisher.py
Class Name: DefaultMetadataProvider
Method Name: AddMetadata


Project Name: MTG/freesound
Commit Name: 0f7bacc26eec44c9f00f5d7666c1f87f0e051ce2
Time: 2017-11-10
Author: andres.ferraro@upf.edu
File Name: search/management/commands/post_dirty_sounds_to_solr.py
Class Name: Command
Method Name: handle