def AddSamples(self, samples, benchmark, benchmark_spec):
    for s in samples:
      # Annotate the sample.
      sample = dict(s.asdict())
      sample['test'] = benchmark

      for meta_provider in self.metadata_providers:
        sample['metadata'] = meta_provider.AddMetadata(
            sample['metadata'], benchmark_spec)

      sample['product_name'] = FLAGS.product_name
      sample['official'] = FLAGS.official
      sample['owner'] = FLAGS.owner
      sample['run_uri'] = benchmark_spec.uuid
      sample['sample_uri'] = str(uuid.uuid4())
      events.sample_created.send(benchmark_spec=benchmark_spec,
                                 sample=sample)
      self.samples.append(sample)
Limit primary search results to Article and Code matches.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/publisher.py/SampleCollector.AddSamples--crossover with--dataset/ETHPy150Open mozilla/source/source/base/views.py/SourceSearchView.get_results