ds.ov2.test
Class Card_performance

java.lang.Object
  extended by ds.ov2.test.Card_performance

 class Card_performance
extends Object

Performance measurements for the protocol layer.

CPP Preprocessing
no cpp preprocessing needed
Execution Environment:
host
Author:
Hendrik Tews
Version:
$Revision: 1.16 $
Last Commit:
$Date: 2009-06-02 13:27:56 $ by $Author: tews $

Field Summary
private  CardChannel card_channel
          Channel to the applet.
private  Check_data_transmission check_transmission
          Instance for data transmission checks.
private  Data_protocol_host data_host
          Host driver instance for the data protocol.
private  Misc_protocols_host misc_host
          Host instance for the miscellaneous protocols.
private  PrintWriter out
          Channel for writing progress and debug messages.
private  Data_protocol_stubs stubs
          Stubs for the data protocol.
 
Constructor Summary
Card_performance(Test_protocols test_protocols, CardChannel card_channel)
          Constructor.
 
Method Summary
 void measure_big_send_and_receive()
          Measure sending 10KB and receiving 10KB and print the timings.
 void measure_ping()
          Measure 10 rounds of the ping protocol and print maximal, minimal and everage timings.
 void measure_proof()
          Measure data transmission with sizes as we expect for the proof protocol for an RSA key size of 2048 bits.
 void measure_receive()
          Measure receiving data from the card.
 void measure_send()
          Measure sending data to the card.
 void run_ex()
          Run all data transmission performance measurements.
 void run()
          Exception wrapper for run_ex().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private PrintWriter out
Channel for writing progress and debug messages.


misc_host

private Misc_protocols_host misc_host
Host instance for the miscellaneous protocols. Needed for accessing the ping protocol.


data_host

private Data_protocol_host data_host
Host driver instance for the data protocol.


check_transmission

private Check_data_transmission check_transmission
Instance for data transmission checks.


stubs

private Data_protocol_stubs stubs
Stubs for the data protocol.


card_channel

private CardChannel card_channel
Channel to the applet.

Constructor Detail

Card_performance

public Card_performance(Test_protocols test_protocols,
                        CardChannel card_channel)
Constructor. Initialize all fields.

Parameters:
test_protocols - protocol array of the test host driver
card_channel - channel to the applet
Method Detail

measure_ping

public void measure_ping()
                  throws CardException
Measure 10 rounds of the ping protocol and print maximal, minimal and everage timings.

Throws:
CardChannel - on communication errors
CardException

measure_send

public void measure_send()
                  throws CardException
Measure sending data to the card. Measures 10 times sending 2KB (2048 Bytes) and prints the timings.

The measurement is slightly biased, because the data is written to EEPROM on the card.

Throws:
CardException - on communication errors
To Do:
Measure transmission time to RAM as well

measure_receive

public void measure_receive()
                     throws CardException
Measure receiving data from the card. Measures 10 times receiving 2KB (2048 Bytes) from the card and prints the timings.

The measurement is slightly biased, because the data is written to EEPROM on the card.

Throws:
CardException - on communication errors
To Do:
Measure transmission time to RAM as well

measure_big_send_and_receive

public void measure_big_send_and_receive()
                                  throws CardException,
                                         Data_protocol_host.Data_error
Measure sending 10KB and receiving 10KB and print the timings.

The measurement is slightly biased, because the data is written to EEPROM on the card.

Throws:
Data_protocol_host.Data_error - never thrown, because the transmission is done with performance flag set to true; only declared to satisfy the compiler
CardException - on communication errors
To Do:
Measure transmission time to RAM as well

measure_proof

public void measure_proof()
                   throws CardException
Measure data transmission with sizes as we expect for the proof protocol for an RSA key size of 2048 bits.

The size used in this method represent the expectations from August 2008, long before the proof protocol has been implemented.

The measurement is slightly biased, because the data is written to EEPROM on the card.

Throws:
CardException - on communication errors
To Do:
Measure transmission time to RAM as well

run_ex

public void run_ex()
            throws CardException,
                   Data_protocol_host.Data_error
Run all data transmission performance measurements.

Throws:
Data_protocol_host.Data_error - never thrown, because the transmission is done with performance flag set to true; only declared to satisfy the compiler
CardException - on communication errors

run

public void run()
Exception wrapper for run_ex(). Runs all the data transmission performance measurements and prints escaping exceptions.