samples.append(raw_dict)
except Exception as e:
logging.info("Exception processing sample %s", line)
logging.info("Exception was: %s", e)
raise e
// We can"t use a SampleCollector because SampleCollector.AddSamples depends on
// having a benchmark and a benchmark_spec.
After Change
// Chop "|" at the beginning and end of labels and split labels by "|,|"
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.
publishers = SampleCollector._PublishersFromFlags()