688aabd67aa6a6f098709643b0a5e672a7d0b01f,tensorboard/summary/writer/record_writer_test.py,RecordWriterTest,test_record_writer_roundtrip,#RecordWriterTest#,51

Before Change


  def test_record_writer_roundtrip(self):
    filename = os.path.join(self.get_temp_dir(), "record_writer_roundtrip")
    w = RecordWriter(open(filename, "wb"))
    bytes_to_write = b"hello world"
    times_to_test = 50
    for _ in range(times_to_test):
      w.write(bytes_to_write)
    w.close()

After Change


  def test_record_writer_roundtrip(self):
    filename = os.path.join(self.get_temp_dir(), "record_writer_roundtrip")
    w = RecordWriter(open(filename, "wb"))
    chunks_to_write = ["hello world{}".format(i).encode() for i in range(10)]
    for bytes in chunks_to_write:
      w.write(bytes)
    w.close()

    r = PyRecordReader_New(filename)
    for bytes in chunks_to_write:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: tensorflow/tensorboard
Commit Name: 688aabd67aa6a6f098709643b0a5e672a7d0b01f
Time: 2019-06-21
Author: orionr@gmail.com
File Name: tensorboard/summary/writer/record_writer_test.py
Class Name: RecordWriterTest
Method Name: test_record_writer_roundtrip


Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_phrases


Project Name: pantsbuild/pants
Commit Name: b0a246995fc8b4eafa91bc123cf0c78e284573f5
Time: 2018-08-16
Author: ericarellano@me.com
File Name: src/python/pants/java/nailgun_executor.py
Class Name: NailgunExecutor
Method Name: _fingerprint