<s> from performanceplatform . client import DataSet <EOL> import logging <EOL> class Pusher ( object ) : <EOL> def __init__ ( self , target_data_set_config , options ) : <EOL> self . data_set_client = DataSet . from_config ( target_data_set_config ) <EOL> self . chunk_size = options . get ( '<STR_LIT>' , <NUM_LIT:100> ) <EOL> self . empty_data_set = options . get ( '<STR_LIT>' , False ) <EOL> def push ( self , data ) : <EOL> if data : <EOL> if self . empty_data_set : <EOL> self . data_set_client . empty_data_set ( ) <EOL> self . data_set_client . post ( <EOL> data , chunk_size = self . chunk_size ) <EOL> else : <EOL> logging . info ( "<STR_LIT>" ) </s>
