def METHOD_NAME(benchmark):
    """
    Event with a medium log line (2000 bytes) and a couple of attributes.
    This benchmark utilizes cStringIO which is only available under Python 2.x and was used
    before the 2.1.1 release.
    This should only serve us as a baseline for some comparisons.
    """
    from cStringIO import StringIO  # pylint: disable=import-error
    line_length = 2000
    attributes_count = 10
    line = generate_random_line(length=line_length)
    attributes = generate_random_dict(keys_count=attributes_count)
    event = Event(thread_id=100)
    event.set_message(line)
    event.add_attributes(attributes)
    output_buffer = StringIO()
    def run_benchmark():
        event.serialize(output_buffer)
        return output_buffer
    result = benchmark.pedantic(run_benchmark, iterations=100, rounds=500)
    output_bytes = result.getvalue()
    assert len(output_bytes) >= line_length
    assert line in output_bytes
    assert "thread" in output_bytes
    assert "attrs" in output_bytes
    assert "message" in output_bytes