387b9c68c8182b82ed1da442892a0aa77372502a,perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py,,_ProcessDeleteKind,#Any#Any#,203

Before Change


  total_count = 0
  while True:
    entities = list(
        client.query(kind=kind).fetch(limit=_CLEANUP_KIND_BATCH_SIZE))
    count_entities = len(entities)
    total_count += count_entities
    if count_entities >= 1:

After Change


      try:
        while entities:
          chunk = entities[:_CLEANUP_KIND_DELETE_BATCH_SIZE]
          entities = entities[_CLEANUP_KIND_DELETE_BATCH_SIZE:]
          client.delete_multi(entity.key for entity in chunk)
        logging.info("Finished %d deletes for %s", count_entities, kind)
      except ValueError as error:
        logging.error("Delete entities for %s failed due to %s", kind, error)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 387b9c68c8182b82ed1da442892a0aa77372502a
Time: 2020-06-08
Author: p3rf@google.com
File Name: perfkitbenchmarker/linux_benchmarks/cloud_datastore_ycsb_benchmark.py
Class Name:
Method Name: _ProcessDeleteKind


Project Name: biotite-dev/biotite
Commit Name: 227534c96ece3839fe95075be096f07557b7d464
Time: 2020-02-20
Author: patrick.kunzm@gmail.com
File Name: doc/examples/scripts/sequence/plasmid_map.py
Class Name:
Method Name:


Project Name: sassoftware/python-dlpy
Commit Name: a3684bee08675c7005eb32e538e07f0071e9427a
Time: 2018-11-01
Author: alex.ge@sas.com
File Name: dlpy/model_conversion/write_onnx_model.py
Class Name:
Method Name: sas_to_onnx