.. role:: ts-api-decorator

############################
CommunicationPerformanceData
############################

.. js:module:: cee.ug
   :noindex:

.. container:: ts-api-section

   .. js:class:: CommunicationPerformanceData

      Performance data related to the communication between client and server.



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-interface

   * :js:attr:`~cee.ug.CommunicationPerformanceData.dataSizeBytes`
   * :js:attr:`~cee.ug.CommunicationPerformanceData.roundTripTimeMS`
   * :js:attr:`~cee.ug.CommunicationPerformanceData.serverElapsedTimeMS`
   * :js:attr:`~cee.ug.CommunicationPerformanceData.topic`





------------

Properties
==========

.. container:: ts-api-section

   .. js:attribute:: CommunicationPerformanceData.dataSizeBytes

      :type: number :ts-api-decorator:`optional`

      The amount of data in this transaction. This is applicable for ReqDataPieces.

      As there are very little sever processing time on ReqDataPieces, the bandwidth between client and server
      can be estimated by dataSizeBytes/roundTripTimeMS, especially for larger data batches. The server
      will request all data pieces in one call, so there is no round-trip time for each data piece.



.. container:: ts-api-section

   .. js:attribute:: CommunicationPerformanceData.roundTripTimeMS

      :type: number

      Round-trip time in milliseconds. This includes server processing time and data transfer time



.. container:: ts-api-section

   .. js:attribute:: CommunicationPerformanceData.serverElapsedTimeMS

      :type: number :ts-api-decorator:`optional`

      Optional time spent on the server. Applicable for UpdateServerVisualization and GetStepConfig topic.

      For the UpdateServerVisualization and GetStepConfig topic, a measure of the latency between 
      client and server could be estimated by looking at (roundTripTimeMS - serverElapsedTimeMS).



.. container:: ts-api-section

   .. js:attribute:: CommunicationPerformanceData.topic

      :type: string

      The type of action the performance data relates to.

      Possible values:

      - 'UpdateServerVisualization': Update the server with the current setting. This will prepare everything on the 
        server side and send back the needed data pieces, but not the data itself.

      - 'ReqStepConfig': Used when having an animation. The server is already updated with regards to the display model,
        so GetStepConfig will query the data pieces needed the selected time step.

      - 'ReqDataPieces': Stream ready to send data pieces from the server to the client. The data payload of the
        3D Progressive object streaming



