
    
                     4   d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZej                  j                  d       ddl
mZ ddlmZ 	 ddl
mZ d	Zd
 Zedk(  r	  e ej(                         d          yy# e$ r  ej                   d       Y @w xY w#  Y yxY w)z$Script for reporting gcloud metrics.    )absolute_import)division)unicode_literalsN)
argv_utils)files)requests
   c                 .   t        j                  |       5 }t        j                  |      }ddd       t	        j
                  |        t        j                         }D ](  }|j                  |d   |d   |d   |d   t               * y# 1 sw Y   `xY w)zSends the specified anonymous usage event to the given analytics endpoint.

  Args:
      metrics_file_path: str, File with pickled metrics (list of tuples).
  N   r         )dataheaderstimeout)
r   BinaryFileReaderpickleloadosremover   SessionrequestTIMEOUT_IN_SEC)metrics_file_pathmetrics_filemetricssessionmetrics        +lib/googlecloudsdk/core/metrics_reporter.pyReportMetricsr   4   s     /0Lkk,'G 1))'fOOF1Ivayvay&)*  ,  10s   BB__main__r   )__doc__
__future__r   r   r   r   r   syspathpopgooglecloudsdk.corer   googlecloudsdk.core.utilr   r   ImportErrorexitr   r   __name__GetDecodedArgv     r   <module>r.      s     + &  ' 	  
 Q + ** ,  z	+*++-a01 3  
#((1+:	s   	A6 B 6BBB