home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-rfced-stanislevic-00.txt < prev    next >
Text File  |  1997-08-25  |  51KB  |  1,256 lines

  1.  
  2.  
  3. INTERNET-DRAFT            EXPIRES: FEB 1998          INTERNET-DRAFT
  4. Network Working Group                                     H. Stanislevic
  5. INTERNET-DRAFT                                                   HSCOMMS
  6.                                                             August, 1997
  7.  
  8.  
  9.             End-to-End Throughput and Response Time Testing
  10.            With HTTP User Agents and the JavaScript Language
  11.          <draft-rfced-info-stanislevic-00.txt>
  12.  
  13. Status of this Memo  
  14.  
  15. This document is an Internet-Draft.  Internet-Drafts are working
  16. documents of the Internet Engineering Task Force (IETF), its areas,
  17. and its working groups. Note that other groups may also distribute
  18. working documents as Internet-Drafts.
  19.  
  20. Internet-Drafts are draft documents valid for a maximum of six months
  21. and may be updated, replaced, or obsoleted by other documents at any
  22. time. It is inappropriate to use Internet-Drafts as reference material
  23. or to cite them other than as "work in progress".
  24.  
  25. To view the entire list of current Internet-Drafts, please check the
  26. "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  27. Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe),
  28. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  29. ftp.isi.edu (US West Coast).
  30.  
  31.  
  32. Abstract
  33.  
  34.    This memo describes two simple metrics and a methodology for testing
  35.    end-to-end one-way data throughput and two-way response time at the
  36.    application layer utilizing HTTP [1] (web) servers and user agents
  37.    (web browsers). Two Interactive Hypertext Transfer Test (IHTTT)
  38.    implementations are described in detail.
  39.  
  40. Acknowledgments
  41.  
  42.    This memo and in particular, Section 2c, were inspired by the work of
  43.    the Internet Protocol Performance Metrics (IPPM) IETF working group.
  44.  
  45. Table of Contents
  46.  
  47.    1.   Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
  48.    1a.   Interest  . . . . . . . . . . . . . . . . . . . . . . . . . 2
  49.    1b.   Motivation  . . . . . . . . . . . . . . . . . . . . . . . . 3
  50.    2.   Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 4
  51.    2a.   Advantages  . . . . . . . . . . . . . . . . . . . . . . . . 4
  52.    2b.   Caveats . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  53.    2c.   Statistical Sampling  . . . . . . . . . . . . . . . . . . . 6
  54.    3.   Metrics  . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  55.    3a.   User Data Throughput  . . . . . . . . . . . . . . . . . . . 9
  56.    3b.   User Response Time  . . . . . . . . . . . . . . . . . . . . 9
  57.    3c.   Combined User Response Time/Data Throughput . . . . . . . . 9
  58.    3d.   Some Other Interesting Derived Metrics  . . . . . . . . .  10
  59.    4.   Implementations of Test Methodologies  . . . . . . . . . .  10
  60.    4a.   Test Launch Page  . . . . . . . . . . . . . . . . . . . .  11
  61.    4b.   User Response Time Page . . . . . . . . . . . . . . . . .  12
  62.    4c.   Combined Test Page  . . . . . . . . . . . . . . . . . . .  12
  63.    5.   Test File Names  . . . . . . . . . . . . . . . . . . . . .  12
  64.    6.   Security Considerations  . . . . . . . . . . . . . . . . .  13
  65.    7.   References . . . . . . . . . . . . . . . . . . . . . . . .  13
  66.    8.   Author's Address . . . . . . . . . . . . . . . . . . . . .  13
  67.    9.   Appendix - Sample Test Results and HTML/JavaScript Code  .  14
  68.  
  69.  
  70. Stanislevic                                                     [Page 1]
  71.  
  72. I/D        End-to-End Testing With HTTP User Agents      August 1997
  73.  
  74.  
  75. 1.  Introduction
  76.  
  77. 1a. Interest
  78.  
  79.    In the absence of sophisticated tools and methodologies to measure
  80.    application layer data throughput and response time via complex
  81.    network topologies, simple file copy tests are often performed by
  82.    end users and network designers alike. The scope of such tests
  83.    encompasses not only network layer entities (e.g. routers, links and
  84.    clouds), but also client and server hosts. These tests are often
  85.    performed manually using a variety of sample files. Typically, the
  86.    time taken for a given size file to be transferred from a server to a
  87.    client is measured. The file size (in bits) is then divided by the
  88.    measured time (in seconds), yielding a throughput rate in bits per
  89.    second (Bytes per second * 8). Separately, or in conjunction with
  90.    these tests, the time required to request, transfer and display a
  91.    small amount (e.g. one line) of test data is measured. The former
  92.    test can be said to measure one-way application layer, (or *User*)
  93.    Data Throughput and the latter, two-way User Response Time.
  94.  
  95.    This memo describes automated versions of the above tests which can
  96.    reside on any web server, and be easily performed by any end user.
  97.    The objective is to allow end users to run these types of tests via
  98.    HTTP [1] connections in real time with web browsers, thereby
  99.    obtaining useful end-to-end performance data without the need for
  100.    additional tools.
  101.  
  102.    To achieve the above objective:
  103.  
  104.    - All client software shall be contained within the user agent
  105.      (web browser);
  106.  
  107.    - All test data samples, measurement indicators and measurement
  108.      applications shall be contained in HTML [2] files on the web
  109.      server;
  110.  
  111.    - All measurements shall be performed by the client, using its
  112.      internal clock. (A single clock source is always self-synchronized,
  113.      thereby exhibiting little relative skew or drift. For this reason,
  114.      external time standards are not required.);
  115.  
  116.    - All test results shall be collected and displayed by the client in
  117.      real time and shall be exportable to analysis tools (e.g.
  118.      spreadsheets).
  119.  
  120.    As the test methodology in this memo resides at the application layer,
  121.    its use is not limited to HTTP connections. It will work via
  122.    connections established using any file copy protocol capable of
  123.    transporting HTML. However, to be most relevant within the context of
  124.  
  125.  
  126. Stanislevic                                                     [Page 2]
  127.  
  128. I/D        End-to-End Testing With HTTP User Agents      August 1997
  129.  
  130.  
  131.    the Internet, we will limit the scope of our discussion to HTTP over
  132.    wide-area networks.
  133.  
  134.    It is intended for this memo to stimulate discussion, leading
  135.    eventually to the adoption of standards and the proliferation of
  136.    these, or other similar, test files on many sites around the
  137.    Internet. With the above web sites as sources of the test data and
  138.    measurement applications, basic real-time application layer
  139.    performance tests could be carried out by end users at any time,
  140.    simply by browsing the appropriate web pages.
  141.  
  142. 1b. Motivation
  143.  
  144.    (1) HTTP and World Wide Web services have become ubiquitous on the
  145.        Internet. It is now possible to access information on nearly any
  146.        subject in real time (within the bounds of network, client and
  147.        server performance) using this protocol. For the average user,
  148.        however, real-time and cumulative information about the
  149.        performance of particular HTTP connections is harder to come by.
  150.        Experience has shown a great deal of variation in user-perceived
  151.        performance from site to site, time to time and ISP to ISP. Work
  152.        is in progress by the IETF Internet Protocol Performance Metric
  153.        working group to develop Internet Provider Performance Metrics
  154.        for both connection oriented and connectionless services. HTTP
  155.        and ICMP [5] tests have been devised and implemented to measure
  156.        performance statistically on an ongoing basis. Individuals at
  157.        organizations such as Intel, Hewlett-Packard and the Pittsburgh
  158.        Supercomputing Center have developed software to perform these
  159.        tests and ISPs have been asked to cooperate in these efforts.
  160.        This memo addresses the need for a basic, repeatable, end-user
  161.        test capability requiring minimal external support.
  162.  
  163.    (2) A great many users access the Internet via analog dial-up links.
  164.        To achieve acceptable performance, these connections depend to a
  165.        large extent on link data compression algorithms implemented in
  166.        modems. Again, experience has shown that there are not only
  167.        variations between these algorithms, but also in their
  168.        implementation and execution by modems from different vendors.
  169.        The smallest modem configuration errors can result in a loss of
  170.        data compression, incorrect serial port speed settings, which
  171.        cannot take full advantage of the compression algorithms, etc.
  172.  
  173.    (3) Various script files have been developed and packaged with remote
  174.        access application software. These scripts are intended to
  175.        optimally configure each vendor's modems under the control of the
  176.        applications. Often times however, due to the variations noted
  177.        above, as well as the large number of modem types currently in
  178.        use, the applications' scripts do *not* configure the modems
  179.        optimally. Status messages generated by modems are also
  180.  
  181.  
  182. Stanislevic                                                     [Page 3]
  183.  
  184. I/D        End-to-End Testing With HTTP User Agents      August 1997
  185.  
  186.  
  187.        configurable and inconsistent. Often times they are not displayed
  188.        correctly via the applications' user interfaces. This causes
  189.        inaccurate information about the status of the dial-up connection
  190.        to be reported to the user. Such errors can lead a user to
  191.        believe that he is achieving optimal performance when, in fact he
  192.        is not, or that he is not achieving optimal performance when, in
  193.        fact he is.
  194.  
  195.    (4) Finally, service providers may not support the highest available
  196.        serial port speeds (or their equivalent) on their side of the
  197.        dial-up connection. For example, a connection of "28.8 kbps"
  198.        should be capable of carrying compressible data at two to four
  199.        times that rate with current modem compression algorithms. This
  200.        can only occur if user hosts, modems and service provider
  201.        equipment (i.e. modems, remote access servers, etc.) are
  202.        configured to work at the highest available serial data rates -
  203.        *not* the analog wire speeds of the modems. To achieve and verify
  204.        the maximum possible throughput, the test data samples in the
  205.        HTML documents described herein were designed to be highly
  206.        compressible. (Modem compression can always be disabled by end
  207.        users if desired.)
  208.  
  209. 2. Discussion
  210.  
  211. 2a. Advantages
  212.  
  213.    This memo suggests a methodology using HTML, JavaScript Ver. 1.1 [3],
  214.    *any* HTTP server and the Netscape Navigator Ver. 3.01 or 4.01
  215.    browser to perform end-to-end one-way data throughput and two-way
  216.    response time tests at the application layer. This software is "off 
  217.    the shelf". It is anticipated that later versions of this user agent
  218.    will continue to support these tests with little or no changes to the
  219.    measurement application. No other software or hardware, save that
  220.    normally resident on HTTP clients and web servers, is required, nor
  221.    is access to the server's cgi-bin directory.
  222.  
  223.    Using the methodologies described herein, Test Data Samples are
  224.    contained in standard HTML files (web pages). Measurement Indicators
  225.    (timestamps) and the Measurement Application itself are contained in
  226.    the same web pages as the Test Data Samples. These are written in
  227.    JavaScript Ver. 1.1, a language specifically designed to be
  228.    integrated with, and embedded in, HTML.
  229.  
  230.    Unlike some other HTTP GET tests, those documented herein rely on
  231.    HTML test files of predetermined size and composition. This gives the
  232.    tests a high degree of repeatability across various Internet clients
  233.    and servers. The use of standardized web documents also ensures that
  234.    the throughput test data sample is compressible and that changes to
  235.    the sample data can, at the very least, be controlled.
  236.  
  237.  
  238. Stanislevic                                                     [Page 4]
  239.  
  240. I/D          End-to-End Testing With HTTP User Agents      August 1997
  241.  
  242.  
  243.    To minimize the size of the file used to test User Response Time,
  244.    JavaScript functions are pre-compiled in a separate test launch file.
  245.    The resulting test data sample is only 80 Bytes - small enough to be
  246.    carried in a single TCP packet with a default 536-Byte MSS [4],
  247.    including the HTTP response header.
  248.  
  249.    With respect to the throughput test, a test data sample size of 96 kB
  250.    would result in target (ideal) transit times of 80 seconds at 9.6
  251.    kbps and 500 milliseconds at T1 (1536 kbps), making this sample size
  252.    useful to the vast majority of Internet users.
  253.  
  254.    It is possible to load the HTML files on *any* web server and
  255.    generate measurement data on *any* compliant web browser. Both HTML
  256.    and JavaScript are not platform or OS dependent and versions of the
  257.    required user agent have been developed for a wide variety of client
  258.    systems.
  259.  
  260.    In order to allow end users to obtain empirical real-time
  261.    measurements from *their* perspective, testing is performed on
  262.    actual HTTP clients, rather than lower level network entities
  263.    (e.g. routers, links and clouds), or other hosts. When viewed from
  264.    the lower level perspectives, these measurements can be said to be
  265.    *relative* or *derived*. However, from the *end user perspective*,
  266.    since the test data samples, measurement indicators and measurement
  267.    applications are themselves comprised of typical user data (HTML
  268.    and JavaScript), these measurements can be said to be *absolute*.
  269.    When the measurement perspective is that of the end user, weaknesses
  270.    in user agents, servers, production TCP, HTTP, etc., which would
  271.    contribute to measurement errors at lower levels, are not significant
  272.    as they too are being measured.
  273.  
  274.    The only clock used is that of the client so there are no clock
  275.    synchronization requirements as there are with one-way delay tests.
  276.  
  277.    A pseudo-random Poisson sampling technique is employed to request
  278.    repetitive test samples at unpredictable intervals over user-defined
  279.    time periods. This makes it difficult for an observer to guess the
  280.    sample request times and makes synchronization with other network
  281.    events, which may affect measurement quality over time, unlikely.
  282.  
  283. 2b. Caveats
  284.  
  285.    Given that the client computer's user agent initiates and timestamps
  286.    its requests, and also timestamps, interprets, calculates and
  287.    displays the delays and flow rates of the test data from the server,
  288.    these tests can be said to have absolute accuracy only from the end
  289.    user's perspective. When compared to measurements of lower level
  290.    events (e.g. packet arrival or "wire" times) by external devices
  291.    (e.g. packet filtering protocol analyzers), differences may be
  292.  
  293.  
  294. Stanislevic                                                     [Page 5]
  295.  
  296. I/D          End-to-End Testing With HTTP User Agents      August 1997
  297.  
  298.  
  299.    observed. When run repeatedly with a given client/server pair
  300.    however, these tests provide realistic performance benchmarks that
  301.    should not change over time, other things being equal.
  302.  
  303.    In cases of unacceptable or deteriorating performance, testing can
  304.    continue using different clients and/or servers, other layers of the
  305.    IP suite and/or other tools (e.g. protocol analyzers, ICMP messages
  306.    [5], reference congestion control algorithms [6], etc.) to determine
  307.    the exact cause of the under-performance.
  308.  
  309.    As with any time-sensitive application, for best results, no other
  310.    tasks should be run concurrently on the client during testing
  311.    (including the screen saver). Testing requires only a client's
  312.    browser and IP stack to be active.
  313.  
  314.    Collection of a statistically significant number of samples requires
  315.    repeated transfers of the test files over a given time interval from
  316.    the desired server. If the test files are cached anywhere along the
  317.    path between the client and the server, results will not be
  318.    equivalent to those obtained using the full path to the original
  319.    source server. Caching by the user agent is nullified by discarding
  320.    results from the initial sample and then using a Reload method, but
  321.    intermediate caching servers are not under the control of the client.
  322.  
  323.    Caching servers may be used by ISPs to legitimately improve network
  324.    performance (e.g. between continents), but others (e.g. servers
  325.    located on user premises) will interfere with the operation of these
  326.    tests as the source data will often times *not* be retrieved via the
  327.    Internet. HTTP Version 1.1 [7] allows greater caching control,
  328.    including the ability to designate files as non-cacheable. These
  329.    enhancements to the protocol may motivate the development of future
  330.    versions of these tests.
  331.  
  332. 2c. Statistical Sampling
  333.  
  334.    The following is a discussion of the sampling techniques used by the
  335.    author for data collection. The techniques for analyzing the
  336.    collected data are left to the user. Section 4 will show how the
  337.    test results can be transferred to a spreadsheet or other client-
  338.    resident analysis tool.
  339.  
  340.    A random sampling technique is used to ensure that results are as
  341.    unbiased as possible. JavaScript has the capability of generating
  342.    pseudo-random numbers, which are used to set random inter-sample
  343.    intervals in both tests described herein, immediately after each
  344.    sample is received. A discussion of the criteria used for selection
  345.    of the average size of the inter-sample intervals follows:
  346.  
  347.    The User Response Time test data file is small (80 Bytes), so
  348.  
  349.  
  350. Stanislevic                                                     [Page 6]
  351.  
  352. I/D           End-to-End Testing With HTTP User Agents      August 1997
  353.  
  354.  
  355.    frequent repetitive GETS of the file will not impact network loading
  356.    substantially. Since the User Data Throughput test contains more
  357.    bytes per sample (at least 96 kB), randomized samples with longer
  358.    average inter-sample intervals are employed. To keep to the objective
  359.    of a real-time test that can be meaningful to the *end user*, an
  360.    optional singleton method is made available to GET the latter file
  361.    with a user-initiated manual override prior to the expiration of any
  362.    inter-sample interval.
  363.  
  364.    The value of 96 kB was chosen to simulate a large HTML document.
  365.    This is suitable for measuring throughput from 9.6 kbps to T1 (1536
  366.    kbps), or more, with reasonable accuracy on almost any client. Larger
  367.    test data samples can be used to measure higher throughput rates if
  368.    desired.
  369.  
  370.    Only one TCP connection is used per sample. This parallels the stated
  371.    direction of future HTTP implementation [7] and will therefore
  372.    become an even better representation of "real world" web pages over
  373.    time. Tests using multiple embedded objects could also be developed.
  374.  
  375.    In both tests, Poisson sampling is approximated by repeatedly
  376.    generating GET requests for each test data sample at random
  377.    intervals, averaging a fixed number of requests over a given time
  378.    duration. The random intervals and average frequency of the requests
  379.    are set by the Measurement Application, while the total time duration
  380.    of the test is determined by the user. Auto timeout options of 1/2
  381.    Hour, 1 Hour, 2 Hours, 4 Hours, 8 Hours and 1 Week are provided.
  382.  
  383.    Although the Poisson intervals are set, they may vary as a result
  384.    of the longer transfer times which may occur during busy periods.
  385.    This could result in fewer samples taken during periods of slow
  386.    performance, thereby skewing the averaged results. One possible
  387.    solution to this problem would be to set and start the subsequent
  388.    inter-sample interval *before* the pending requested sample is
  389.    received, but this could result in several samples being received at
  390.    once, (also skewing results), or, as is the case with web browsers,
  391.    an interrupted transfer of the pending sample. Neither of these
  392.    conditions would be desirable during the testing process.
  393.  
  394.    A better alternative would be to set the average inter-sample
  395.    interval to be much larger (e.g. an order of magnitude) than the
  396.    expected average response time (or expected total transit time in the
  397.    case of the throughput test) at the application layer. For example, a
  398.    Response Time test with an average interval of 18 seconds would yield
  399.    about 200 samples per hour. With an expected 1.8-second average
  400.    result, this would actually be implemented by setting the average
  401.    interval to 16.2 seconds immediately after a sample is received. The
  402.    author has chosen this setting for Response Time tests, where the
  403.    order of magnitude rule should suffice. Of course, it is not possible
  404.  
  405.  
  406. Stanislevic                                                     [Page 7]
  407.  
  408. I/D          End-to-End Testing With HTTP User Agents      August 1997
  409.  
  410.  
  411.    to know a priori what the average response time or throughput will be
  412.    so any setting of the Poisson interval would be an educated guess.
  413.  
  414.    This is more complicated in the case of the Throughput Test, because
  415.    available bandwidth plays such a major role in affecting the result.
  416.    Bandwidth can vary widely (i.e. by several orders of magnitude) by
  417.    physical connection type, congestion level, etc. Since the Throughput
  418.    Test file is many times larger than the Response Time Test file, a
  419.    longer interval (less sampling) is desirable so as not to influence
  420.    end-to-end loading, but in no case should fewer than 20 samples per
  421.    hour be taken. This makes inter-sample intervals that are very long
  422.    with respect to transfer times impractical at slower speeds. The
  423.    above notwithstanding, the prudent course would seem to be to make
  424.    the average inter-sample interval at least somewhat longer than the
  425.    file transfer time of the slowest expected connection (i.e. analog
  426.    dial-up, poor line quality, sans data compression - about 9.6 kbps).
  427.  
  428.    Given the above, for the 96 kB Throughput Test, the author has chosen
  429.    an average inter-sample interval of 120 seconds. Variations in
  430.    bandwidth could allow an average of only 18 samples per hour to be
  431.    taken at 9.6 kbps, assuming zero round trip delay, and a maximum
  432.    average of 30 samples per hour in the hypothetical case of a network
  433.    with infinite bandwidth and zero delay. Adding fixed delay values to
  434.    these assumptions and changing the maximum throughput to a value less
  435.    than infinity (e.g. T1), reduces the variations in sampling rates at
  436.    various throughput values, but they are still quite significant.
  437.  
  438.    The implementation of the combined Response Time/Throughput Test
  439.    described herein uses the following Adaptive Poisson Sampling
  440.    technique to address this problem:
  441.  
  442.    Since the client shall not send a request for the next sample until
  443.    the current pending one is received, slow connections will allow
  444.    fewer samples than fast connections, tainting the Poisson algorithm.
  445.    By adjusting the average random inter-sample interval dynamically,
  446.    after the receipt of each sample, depending on the time the sample
  447.    took to arrive, a more constant random sampling rate can be
  448.    maintained. For example, if a file took 30 seconds to be transferred
  449.    to the client, an average inter-sample interval of 120 seconds (30
  450.    per hour) could be shortened to 90 seconds so that over time, the 30
  451.    per hour sample rate will be maintained. Since measurement of the
  452.    file's transfer time is implicit in this test, the adjustment factor
  453.    is computed and applied after each sample is received. Response time
  454.    is compensated for in the same manner.
  455.  
  456.    Other work has been undertaken to define methods to statistically
  457.    compensate for the reduction in the number of samples received during
  458.    periods of slow performance, so as not to understate such performance
  459.    in the analysis phase. The median value and inter-quartile (25th to
  460.  
  461.  
  462. Stanislevic                                                     [Page 8]
  463.  
  464. I/D          End-to-End Testing With HTTP User Agents      August 1997
  465.  
  466.  
  467.    75th percentile) range have proven to be useful in this area. For
  468.    simplicity however, the tests herein produce mean summary results.
  469.  
  470.    The author has defined a 30 second response time-out interval for
  471.    both tests, beginning at the time of the request for the initial
  472.    sample. The choice of this value reflects typical user attempts to
  473.    retry requests after a period of perceived idle time has elapsed. If
  474.    this timer expires, an error message is displayed by the client and a
  475.    retry occurs. Error statistics can then be generated based on the
  476.    number of unsuccessful attempts.
  477.  
  478. 3. Metrics
  479.  
  480.    These metrics are application layer, file copy metrics and should not
  481.    be confused with others developed for use at the network and/or
  482.    transport layers. It is assumed that all requests are made to the
  483.    same Domain Name (host) and that name resolution has been completed.
  484.  
  485. 3a. User Data Throughput
  486.  
  487.      At Time0, a file containing a throughput test data sample of
  488.      N kBytes is requested from the server by the client.
  489.      At Time1, the first byte of the file's throughput test data sample
  490.      is received by the client from the server.
  491.      At Time2, the last byte of the sample's contents is received by the
  492.      client from the server.
  493.      dTime3 is defined as the difference, in seconds, between Time2 and
  494.      Time1, as measured by the client.
  495.      The User Data Throughput in kbps is defined as 8*N/dTime3.
  496.  
  497. 3b. User Response Time
  498.  
  499.      At Time0, a file of N Bytes where N<(MSS-HTTP header) contained
  500.      in a single TCP packet is requested from the server by the client.
  501.      At Time1, the file is received by the client from the server.
  502.      dTime2, the User Response Time, is defined as the difference
  503.      between Time1 and Time0 in milliseconds, as measured by the client.
  504.  
  505. 3c. Combined User Response Time/Data Throughput
  506.  
  507.    Both of the above metrics can be combined as follows to allow
  508.    measurement of correlation between them:
  509.  
  510.      At Time0, a file containing a throughput test data sample of
  511.      N kBytes is requested from the server by the client.
  512.      At Time1, the first byte of the file's contents is received by the
  513.      client from the server.
  514.      dTime2, the User Response Time, is defined as the difference
  515.      between Time1 and Time0 in milliseconds, as measured by the client.
  516.  
  517.  
  518. Stanislevic                                                     [Page 9]
  519.  
  520. I/D          End-to-End Testing With HTTP User Agents      August 1997
  521.  
  522.  
  523.      At Time3, the first byte of the file's throughput test data sample
  524.      is received by the client from the server.
  525.      At Time4, the last byte of the sample's contents is received by the
  526.      client from the server.
  527.      dTime5 is defined as the difference, in seconds, between Time4 and
  528.      Time3, as measured by the client.
  529.      The User Data Throughput in kbps is defined as 8*N/dTime5.
  530.  
  531. 3d. Some Other Interesting Derived Metrics
  532.  
  533.    Knowing how the total transaction time is divided between initial
  534.    response time and subsequent data transfer time, is useful in
  535.    determining likely causes of performance anomalies, especially if
  536.    costly alternatives are being considered to improve performance. For
  537.    example, if the major portion of the total transaction time is due to
  538.    response time rather than transfer time, adding more bandwidth to the
  539.    network will probably not improve performance significantly.
  540.  
  541.    Given the metrics in Section 3c, it is a simple matter to derive:
  542.  
  543.      dTime6, the Total Transaction Time, in seconds, defined as,
  544.      dTime2+dTime5.
  545.  
  546.    We can then express dTime2 and dTime5 as percentages of the Total
  547.    Transaction Time:
  548.  
  549.      100*dTime2/dTime6 is defined as the percentage of User Response
  550.      Time.
  551.      100*dTime5/dTime6 is defined as the percentage of User Data
  552.      Throughput Time.
  553.  
  554. 4. Implementations of Test Methodologies
  555.  
  556.    The author's implementation of the tests consists of three web server
  557.    files and a Results Window which is generated on the client side in 
  558.    JavaScript. Timestamps are inserted to conform to the metrics in
  559.    Section 3 as closely as possible. All or part of the contents of the
  560.    Results Window can be saved as a text file or spreadsheet for
  561.    subsequent analysis. A menu bar with a Copy option is provided for
  562.    this purpose as part of the Results Window GUI. To observe possible
  563.    correlation between response time and throughput measurements, the
  564.    combination test described in Section 3c is implemented as are the
  565.    metrics derived in Section 3d. The ability to measure both parameters
  566.    of each sample aids in determining likely causes of performance
  567.    anomalies.
  568.  
  569.    The following summarizes the author's implementations of the tests.
  570.    They are more fully documented in Section 9. Suggested file names
  571.    appear below and in Section 5.
  572.  
  573.  
  574. Stanislevic                                                    [Page 10]
  575.  
  576. I/D         End-to-End Testing With HTTP User Agents      August 1997
  577.  
  578.  
  579. 4a. Test Launch Page (ihttt.htm)
  580.  
  581.    This initial web page contains a description of the tests in HTML and
  582.    the JavaScript functions which open the client side Results Window.
  583.    Button objects are defined to trigger onClick Event Handlers which
  584.    call the functions. The user is offered a choice of a Response Time
  585.    only test or a combination Response Time/Throughput test. When
  586.    called, these functions in turn, write HTML and more functions, to
  587.    the Results Window. The latter functions persist, even after their
  588.    parent window's URL has been changed to load the test data sample 
  589.    pages. The persistent functions perform as follows:
  590.  
  591.    For both tests:
  592.  
  593.    1) offer the user a choice of test durations and set the selected
  594.       termination time;
  595.    2) initialize sample counter and results adders to zero (used to
  596.       calculate mean summary results);
  597.    3) request test data sample from the server;
  598.    4) get the time of each request (per the client's internal clock);
  599.    5) get the file's arrival time (at the application layer, per the
  600.       client's internal clock);
  601.    6) calculate the time difference between the last pending request
  602.       and the file's arrival (dTime2);
  603.    7) display the sample's arrival date and time in HTML in the
  604.       Results Window;
  605.    8) display the Response Time test result (dTime2) in milliseconds in
  606.       HTML in the Results Window;
  607.  
  608.    For the Response Time Test:
  609.  
  610.    9) ignore the first sample received if its transfer time was <1
  611.       second, (possibly locally cached); if not, use it;
  612.   10) calculate the next Poisson inter-sample interval;
  613.  
  614.    For the combined Response Time/Throughput Test:
  615.  
  616.   11) get Time3 (section 3c) per the client's internal clock);
  617.   12) receive the throughput test data sample;
  618.   13) get Time4 (section 3c) per the client's internal clock);
  619.   14) calculate dTime5 and dTime6 (section 3c);
  620.   15) ignore the first sample received if its transfer time (dTime6) was
  621.       <10 seconds, (possibly locally cached); if not, use it;
  622.   16) calculate User Data Throughput in kbps and display it in HTML in
  623.       the Results Window;
  624.   17) calculate the percentage of Total Transaction Time for Response
  625.       Time and Transfer Time and display them in HTML in the Results
  626.       Window;
  627.   18) calculate the next Adaptive Poisson inter-sample interval;
  628.  
  629.  
  630. Stanislevic                                                    [Page 11]
  631.  
  632. I/D           End-to-End Testing With HTTP User Agents      August 1997
  633.  
  634.  
  635.    For both tests:
  636.  
  637.   19) request the next sample (reload document from server);
  638.   20) get the time of the request (per the client's internal clock)
  639.   21) if the next sample is not received in 30 seconds, display an
  640.       error message in HTML in the Results Window and reload the
  641.       document from the server by repeating item 3 above;
  642.   22) upon test completion, compute and display mean summary results.
  643.  
  644.    The HTML/JavaScript code for this page, with comments, appears in
  645.    Section 9b (1).
  646.  
  647. 4b. User Response Time Page (delay.htm)
  648.  
  649.    All necessary functions are called from the Results Window when this
  650.    document is loaded. A Button object is defined and written to this
  651.    page on the client side to allow the user to terminate the test at
  652.    will. Calling persistent, pre-compiled functions from the Results
  653.    Window allows the size of this file to be limited to 80 Bytes (one
  654.    line of text). The file can be contained in a single TCP packet,
  655.    including all headers.
  656.  
  657.    The HTML/JavaScript code for this page, with comments, appears in
  658.    Section 9b (2).
  659.  
  660. 4c. Combined User Data Throughput/Response Time Page (thrpt.htm)
  661.  
  662.    This page triggers both response time and throughput measurements.
  663.    Button objects are defined to allow the user to terminate the test at
  664.    will, or to request the next sample prior to the expiration of any
  665.    Adaptive Poisson interval. All the functions called by this page are
  666.    pre-compiled in the Results Window. This page contains 96kB of
  667.    compressible test data and some descriptive HTML.
  668.  
  669.    The HTML/JavaScript code for this page, with comments, appears in
  670.    Section 9b (3).
  671.  
  672. 5. Test File Names
  673.  
  674.    In order to make these, or other similar test files, easily
  675.    accessible to Internet users wishing to run the tests from a given
  676.    server, the following is suggested as a file naming convention.
  677.    For the example host www.isi.edu:
  678.  
  679.      Test Launch Page: www.isi.edu/rfcNNNN/ihttt.htm
  680.      User Response Time Page: www.isi.edu/rfcNNNN/delay.htm
  681.      Combined User Data Throughput/Response Time Page:
  682.      www.isi.edu/rfcNNNN/thrpt.htm
  683.  
  684.  
  685.  
  686. Stanislevic                                                    [Page 12]
  687.  
  688. I/D          End-to-End Testing With HTTP User Agents      August 1997
  689.  
  690.  
  691. 6. Security Considerations
  692.  
  693.    This memo raises no security issues.
  694.  
  695. 7. References
  696.  
  697.    [1] Berners-Lee, T., Fielding, R., Nielsen, H., "Hypertext Transfer
  698.        Protocol -- HTTP/1.0", MIT/LCS and UC Irvine, RFC 1945, May, 1996
  699.  
  700.    [2] Berners-Lee, T., and Connolly, D., "Hypertext Markup Language -
  701.        2.0", MIT/W3C, RFC 1866, November, 1995
  702.  
  703.    [3] Netscape JavaScript Reference
  704.        http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/
  705.  
  706.    [4] Postel, J. "TCP Maximum Segment Size and Related Topics", ISI,
  707.        RFC 879, October, 1983
  708.  
  709.    [5] Postel, J., "Internet Control Message Protocol", ISI, RFC 792,
  710.        (STD 5), September, 1981
  711.  
  712.    [6] Stevens, W., "TCP Slow Start, Congestion Avoidance, Fast
  713.        Retransmit, and Fast Recovery Algorithms", NOAO, RFC 2001,
  714.        January, 1997
  715.  
  716.    [7] Fielding, R., et al., "Hypertext Transfer Protocol -- HTTP/1.1",
  717.        UC Irvine, DEC, MIT/LCS, RFC 2068, January, 1997
  718.  
  719. 8. Author's Address
  720.  
  721.    Howard Stanislevic
  722.    HSCOMMS Network Engineering
  723.    and Consulting
  724.    15-38 146 Street
  725.    Whitestone, NY 11357
  726.  
  727.    Phone: 718-746-0150
  728.    EMail: hscomms@aol.com
  729.  
  730.  
  731. I/D        End-to-End Testing With HTTP User Agents      August 1997
  732.  
  733.  
  734. 9. Appendix
  735.  
  736. 9a. Sample Test Results Output (Combined Test):
  737. +----------------------------------------------------------------------+
  738. |                      Netscape - [Test Results]                       |
  739. +----------------------------------------------------------------------+
  740. | File  Edit  View  Go  Bookmarks  Options  Directory  Window  Help    |
  741. +----------------------------------------------------------------------+
  742.               Thank you. You have selected a 1 Hour test.             
  743. ------------------------------------------------------------------------
  744.               Response Time and Throughput for a 96kB File              
  745.            Retrieved at Random Intervals Averaging 120 Seconds          
  746.  
  747. +----------------------------------------------------------------------+
  748. |                    Response      Thrpt         % of Total Time       |
  749. |  Date     Time    Time (msec)   (kbps)    Resp Time   Transfer Time  |
  750. +----------------------------------------------------------------------+
  751.    First sample may have been locally cached. Reloading from server...  
  752.  
  753. +----------------------------------------------------------------------+
  754. | 7/31/97   11:7:57     441       1024.3      36.1           63.9      |
  755. | 7/31/97   11:9:41    1342        522.2      46.7           53.3      |
  756. | 7/31/97  11:10:13     731        974.4      47.1           52.9      |
  757. +----------------------------------------------------------------------+
  758.                            Total Samples: 3
  759.                     Average Response Time: 838 msec
  760.                       Average Throughput: 840 Kbps
  761. ------------------------------------------------------------------------
  762.       You have ended the test. To save all or part of this data,
  763.                 select Edit from the Menu bar above.
  764. ------------------------------------------------------------------------
  765.  
  766. 9b. HTML and JavaScript code - Interactive Hypertext Transfer Tests
  767.  
  768.    Variables used in the following scripts are defined in Section 3.
  769.    Operation of the tests is summarized in Section 4.
  770.    New lines and indented text are used for clarity and should be
  771.    deleted before dynamically writing to a window.
  772.  
  773. (1) Test Launch Page (ihttt.htm):
  774.  
  775. <HTML>
  776. <HEAD>
  777.    <TITLE>Interactive Hypertext Transfer Tests</TITLE>
  778. <SCRIPT><!--
  779.  
  780. /*Offer user choice of test durations, flag first sample, declare
  781. functions for no response timeout, test reload, test end by user,
  782. test end by timer.*/
  783. function winOpen () {
  784.  o.window.focus();
  785.  
  786.  
  787. Stanislevic                                                    [Page 14]
  788.  
  789. I/D          End-to-End Testing With HTTP User Agents      August 1997
  790.  
  791.  
  792.  o.document.write("<P><CENTER><FONT COLOR=3D'#FFFF00'>
  793.  <B>For how long would you like to run the test?<FORM>
  794.  <INPUT type=3D'button' name=3D'but0' value=3D'1/2 Hour' onClick=3D'Hr12(=
  795. )'>
  796.   
  797.  <INPUT type=3D'button' name=3D'but1' value=3D'1 Hour' onClick=3D'Hr1()'>=
  798.  
  799.  <INPUT type=3D'button' name=3D'but2' value=3D'2 Hours' onClick=3D'Hr2()'=
  800.  <INPUT type=3D'button' name=3D'but4' value=3D'4 Hours' onClick=3D'Hr4()'=
  801.  <INPUT type=3D'button' name=3D'but8' value=3D'8 Hours' onClick=3D'Hr8()'=
  802.  <INPUT type=3D'button' name=3D'butw' value=3D'1 Week' =
  803.  
  804.  onClick=3D'Week()'></FORM>
  805.  <SCRIPT>
  806.  function Hr12() {
  807.   document.write('Thank you. You have selected a 1/2 Hour test.
  808.   </B></FONT></CENTER></P>');
  809.   endTest=3DsetTimeout('testEnd()',1800000);
  810.   testStart();
  811.  }
  812.  function Hr1() {
  813.   document.write('Thank you. You have selected a 1 Hour test.
  814.   </B></FONT></CENTER></P>');
  815.   endTest=3DsetTimeout('testEnd()',3600000);
  816.   testStart();
  817.  }
  818.  function Hr2() {
  819.   document.write('Thank you. You have selected a 2 Hour test.
  820.   </B></FONT></CENTER></P>');
  821.   endTest=3DsetTimeout('testEnd()',7200000);
  822.   testStart();
  823.  }
  824.  function Hr4() {
  825.   document.write('Thank you. You have selected a 4 Hour test.
  826.   </B></FONT></CENTER></P>');
  827.   endTest=3DsetTimeout('testEnd()',14400000);
  828.   testStart();
  829.  }
  830.  function Hr8() {
  831.   document.write('Thank you. You have selected an 8 Hour test.
  832.   </B></FONT></CENTER></P>');
  833.   endTest=3DsetTimeout('testEnd()',28800000);
  834.   testStart();
  835.  }
  836.  function Week() {
  837.   document.write('Thank you. You have selected a 1 Week test.
  838.   </B></FONT></CENTER></P>');
  839.   endTest=3DsetTimeout('testEnd()',604800000);
  840.   testStart();
  841.  }
  842. /*Flag first sample. Initialize sample counter, Total Response Time
  843. and Throughput*/
  844.  
  845.  
  846. Stanislevic                                                    [Page 15]
  847.  
  848. I/D           End-to-End Testing With HTTP User Agents      August 1997
  849.  
  850.  
  851.  Flag=3D1;
  852.  Count=3D0;
  853.  totalRT=3D0;
  854.  totalTh=3D0;
  855.  
  856. /*Display possibly cached warning and reload document.*/
  857.  function noCache() {
  858.   document.write('<HR WIDTH=3D100%><B>First sample may have been locally =
  859.  
  860.   cached. Reloading from server...</B><BR>');
  861.   window.scroll(0,1080);
  862.   testReload()
  863.  }
  864. /*If no response received from server, display error message and reload
  865. document.*/
  866.  function noR() {
  867.   document.write('<B>No response from server for 30 seconds. =
  868.  
  869.   Retrying...</B><BR>');
  870.   window.scroll(0,1080);
  871.   testReload();
  872.  }
  873. /*Clear first sample flag, reload document, get new Time0 and set No
  874. Response Timer.*/
  875.  function testReload() {
  876.   Flag=3D0;
  877.   window.focus();
  878.   opener.location.reload();
  879.   Time0=3Dnew Date();
  880.   Rno=3DsetTimeout('noR()',30000);
  881.  }
  882. /*Terminate test when called by the user and return to Test Launch
  883. page.*/
  884.  function uE() {
  885.   clearTimeout(Rno);
  886.   clearTimeout(Rt);
  887.   clearTimeout(endTest);
  888.   window.focus();
  889.   Summary();
  890.   opener.location.replace('ihttt.htm');
  891.   document.write('<CENTER><FONT COLOR=3DFFFF00>
  892.   <B>You have ended the test. To save all or part of this data,<BR>
  893.   select Edit from the Menu bar above.</B></FONT></CENTER>
  894.   <HR WIDTH=3D100%>');
  895.   window.scroll(0,1080);
  896.  }
  897. /*Terminate test when time expires and return to Test Launch page.*/
  898.  function testEnd() {
  899.   clearTimeout(Rno);
  900.   clearTimeout(Rt);
  901.   Summary();
  902.  
  903.  
  904. Stanislevic                                                    [Page 16]
  905.  
  906. I/D          End-to-End Testing With HTTP User Agents      August 1997
  907.  
  908.  
  909.   opener.location.replace('ihttt.htm');
  910.   document.write('<CENTER><FONT COLOR=3DFFFF00><B>Test Complete! =
  911.  
  912.   To save all or part of this data,<BR>
  913.   select Edit from the Menu bar above.</B></FONT></CENTER>
  914.   <HR WIDTH=3D100%>');
  915.   window.scroll(0,1080);
  916.  }
  917. </SCRIPT>");
  918. }
  919. /*Open Results Window, declare Response Time Test functions. Create user
  920. Stop Test button in main window.*/
  921. function testDelay() {
  922.  o=3Dwindow.open("","Rsl","height=3D250,width=3D640,scrollbars=3D1,status=
  923. =3D0,
  924.  toolbar=3D0,directories=3D0,menubar=3D1,resizable=3D0");
  925.  o.document.close();
  926.  o.document.write("<HEAD><TITLE>Test Results</TITLE></HEAD>
  927.  <BODY TEXT=3D'#FF0000' BGCOLOR=3D'#000000'>
  928.  <SCRIPT>
  929. /*Get arrival time, calculate dTime2. If this is a first sample AND
  930. transfer time was short, discard data, otherwise display date/time and
  931. Response Time, create user Stop Test button, increment sample counter,
  932. compute new Total Response Time, set Poisson inter-sample interval
  933. between 0 and 32.4 seconds.*/
  934.  function A() {
  935.   Time1=3Dnew Date();
  936.   clearTimeout(Rno);
  937.   dTime2=3D(Time1-Time0);
  938.   If (Flag=3D=3D1 && dTime2<1000) {
  939.    noCache()
  940.   }
  941.   else {
  942.    B()
  943.   }
  944.  }
  945.  function B() {
  946.   dat1=3DTime1.getDate();
  947.   mon1=3D1+Time1.getMonth();
  948.   yea1=3DTime1.getYear();
  949.   hou1=3DTime1.getHours();
  950.   min1=3DTime1.getMinutes();
  951.   sec1=3DTime1.getSeconds();
  952.   document.write('<CENTER><TABLE BORDER=3D1 CELLSPACING=3D0 WIDTH=3D65%>
  953.   <TR ALIGN=3DCENTER>
  954.   <TD ALIGN=3DCENTER WIDTH=3D13%>',(mon1),'/',(dat1),'/',(yea1),'</TD>
  955.   <TD ALIGN=3DCENTER WIDTH=3D20%>',(hou1),':',(min1),':',(sec1),'</TD>
  956.   <TD ALIGN=3DCENTER WIDTH=3D32%>',(dTime2),'</TD>
  957.   </TR></TABLE></CENTER> ');
  958.   window.scroll(0,1080);
  959.  
  960.  
  961.  
  962. Stanislevic                                                    [Page 17]
  963.  
  964. I/D           End-to-End Testing With HTTP User Agents      August 1997
  965.  
  966.  
  967.   opener.document.write ('<br><br><br><br><br><br><br><br><br><br><br>
  968.   <br><center><form><input type=3Dbutton =
  969.  
  970.   value=3DSTOP and Return to Test Menu =
  971.  
  972.   onClick=3Do.uE()></form></center>');
  973.   Count++;
  974.   totalRT+=3DdTime2;
  975.   Rt=3DsetTimeout('testReload()',(Math.random()*32400));
  976.  }
  977. /*Start test, get Time0, set No Response timeout*/
  978.  function testStart() {
  979.   document.write('<HR WIDTH=3D100%><CENTER><FONT COLOR=3D3C9CE3>
  980.   <B>Response Time for an 80-Byte File<BR>
  981.   Retrieved at Random Intervals Averaging 18 Seconds</B></FONT>
  982.   <HR WIDTH=3D100%><TABLE CELLSPACING=3D0 WIDTH=3D65%><TR>
  983.   <TD ALIGN=3DCENTER WIDTH=3D13%><FONT COLOR=3DFFFF00><B>Date</B></FONT><=
  984. /TD>
  985.   <TD ALIGN=3DCENTER WIDTH=3D20%><FONT COLOR=3DFFFF00><B>Time</B></FONT><=
  986. /TD>
  987.   <TD ALIGN=3DCENTER WIDTH=3D32%><FONT COLOR=3DFFFF00>
  988.   <B>Response Time (msec)</B></FONT></TD></TR></TABLE>');
  989.   window.scroll(0,1080);
  990.   opener.window.location.href=3D('delay.htm');
  991.   Time0=3Dnew Date();
  992.   Rno=3DsetTimeout('noR()',30000);
  993.  }
  994. /*Compute and write Average Response Time.*/
  995.  function Summary(){
  996.   avRT=3DMath.round(totalRT/Count);
  997.   document.write('<B><FONT COLOR=3D3C9CE3>Total Samples: </FONT>
  998.   <FONT COLOR=3DFF0000>',(Count),'</FONT><BR><FONT COLOR=3D3C9CE3>
  999.   Average Response Time: </FONT>
  1000.   <FONT COLOR=3DFF0000>',(avRT),' msec</FONT></B><HR WIDTH=3D100%>')
  1001.  }
  1002. </SCRIPT>");
  1003. winOpen();
  1004. }
  1005. /*Open Results Window, declare combined Response Time/Throughput Test
  1006. functions.*/
  1007. function testThrpt() {
  1008.  o=3Dwindow.open("","Rsl","height=3D250,width=3D640,scrollbars=3D1,status=
  1009. =3D0,
  1010.  toolbar=3D0,directories=3D0,menubar=3D1,resizable=3D0");
  1011.  o.document.close();
  1012.  o.document.write("<HEAD><TITLE>Test Results</TITLE></HEAD>
  1013.  <BODY TEXT=3D'#FF0000' BGCOLOR=3D'#000000'><SCRIPT>
  1014. /*Calculate dTime5, dTime2 and dTime6. if this is a first sample AND
  1015. transfer time was short, discard data.*/
  1016.  function ifFirst() {
  1017.   dTime5=3D(Time4-Time3);
  1018.   dTime2=3D(Time1-Time0);
  1019.   dTime6=3D(dTime2+dTime5);
  1020.  
  1021.  
  1022.  
  1023. Stanislevic                                                    [Page 18]
  1024.  
  1025. I/D          End-to-End Testing With HTTP User Agents      August 1997
  1026.  
  1027.  
  1028.   If (Flag=3D=3D1 && dTime6<10000) {
  1029.    noCache()
  1030.   }
  1031.   else {
  1032.    APS()
  1033.   }
  1034.  }
  1035. /*Reload test when called by user.*/
  1036.  function userReload() {
  1037.   clearTimeout(Rt);
  1038.   testReload()
  1039.  }
  1040. /*Get arrival time*/
  1041.  function aT() {
  1042.   Time1=3Dnew Date();
  1043.   clearTimeout(Rno);
  1044.  }
  1045. /*Get Time3*/
  1046.  function T3() {
  1047.   Time3=3Dnew Date();
  1048.  }
  1049. /*Get Time4*/
  1050.  function T4() {
  1051.   Time4=3Dnew Date();
  1052.  }
  1053. /*Display date/time, Response Time, Throughput and % of Total Time,
  1054. increment sample counter, compute new Total Response Time and Throughput
  1055. set Adaptive Poisson interval between 0 and (240-(2*dTime6)) secs.*/
  1056.  function APS() {
  1057.   dat1=3DTime1.getDate();
  1058.   mon1=3D1+Time1.getMonth();
  1059.   yea1=3DTime1.getYear();
  1060.   hou1=3DTime1.getHours();
  1061.   min1=3DTime1.getMinutes();
  1062.   sec1=3DTime1.getSeconds();
  1063.   Thrpt=3DMath.round(8000000/dTime5)/10;
  1064.   document.write('<TABLE BORDER=3D1 CELLSPACING=3D0 WIDTH=3D100%>
  1065.   <TR ALIGN=3DCENTER>
  1066.   <TD ALIGN=3DCENTER WIDTH=3D13%>',(mon1),'/',(dat1),'/',(yea1),'</TD>
  1067.   <TD ALIGN=3DCENTER WIDTH=3D13%>',(hou1),':',(min1),':',(sec1),'</TD>
  1068.   <TD ALIGN=3DCENTER WIDTH=3D20%>',(dTime2),'</TD>
  1069.   <TD ALIGN=3DCENTER WIDTH=3D12%>',(Thrpt),'</TD>
  1070.   <TD ALIGN=3DCENTER WIDTH=3D21%>',Math.round(1000*dTime2/dTime6)/10,'</T=
  1071. D>
  1072.   <TD ALIGN=3DCENTER WIDTH=3D21%>',Math.round(1000*dTime5/dTime6)/10,'</T=
  1073. D>
  1074.   </TR></TABLE>');
  1075.   window.scroll(0,1080);
  1076.   Count++;
  1077.   totalRT+=3DdTime2;
  1078.   totalTh+=3DThrpt;
  1079.  
  1080.  
  1081. Stanislevic                                                    [Page 19]
  1082.  
  1083. I/D          End-to-End Testing With HTTP User Agents      August 1997
  1084.  
  1085.  
  1086.  Rt=3DsetTimeout('testReload()',(Math.random()*(240000-(2*dTime6))))
  1087.  }
  1088. /*Start test, get Time0, set No Response timeout*/
  1089.  function testStart() {
  1090.   document.write('<HR WIDTH=3D100%><CENTER><FONT COLOR=3D3C9CE3>
  1091.   <B>Response Time and Throughput for a 96kB File<BR>
  1092.   Retrieved at Random Intervals Averaging 120 Seconds</B></FONT>
  1093.   <HR WIDTH=3D100%><TABLE CELLSPACING=3D0 WIDTH=3D100%><TR>
  1094.   <TD ALIGN=3DCENTER COLSPAN=3D2 WIDTH=3D26%></TD>
  1095.   <TD ALIGN=3DCENTER WIDTH=3D20%><FONT COLOR=3DFFFF00>
  1096.   <B>Response</B></FONT></TD>
  1097.   <TD ALIGN=3DCENTER WIDTH=3D12%><FONT COLOR=3DFFFF00><B>Thrpt</B></FONT>=
  1098. </TD>
  1099.   <TD ALIGN=3DCENTER COLSPAN=3D2 WIDTH=3D42%><FONT COLOR=3DFFFF00>
  1100.   <B>% of Total Time</B></FONT></TD></TR>
  1101.   <TR><TD ALIGN=3DCENTER WIDTH=3D13%><FONT COLOR=3DFFFF00>
  1102.   <B>Date</B></FONT></TD>
  1103.   <TD ALIGN=3DCENTER WIDTH=3D13%><FONT COLOR=3DFFFF00><B>Time</B></FONT><=
  1104. /TD>
  1105.   <TD ALIGN=3DCENTER WIDTH=3D20%><FONT COLOR=3DFFFF00>
  1106.   <B>Time (msec)</B></FONT></TD>
  1107.   <TD ALIGN=3DCENTER WIDTH=3D12%><FONT COLOR=3DFFFF00><B>(kbps)
  1108.   </FONT></B></TD>
  1109.   <TD ALIGN=3DCENTER WIDTH=3D21%><FONT COLOR=3DFFFF00>
  1110.   <B>Resp Time</B></FONT></TD>
  1111.   <TD ALIGN=3DCENTER WIDTH=3D21%><FONT COLOR=3DFFFF00>
  1112.   <B>Transfer Time</B></FONT></TD>
  1113.   </TR></TABLE>');
  1114.   window.scroll(0,1080);
  1115.   opener.window.location.href=3D('thrpt.htm');
  1116.   Time0=3Dnew Date();
  1117.   Rno=3DsetTimeout('noR()',30000);
  1118.  }
  1119.  function Summary(){
  1120.   avRT=3DMath.round(totalRT/Count);
  1121.   avTT=3DMath.round(totalTh/Count);
  1122.   document.write('<B><FONT COLOR=3D3C9CE3>Total Samples: </FONT>
  1123.   <FONT COLOR=3DFF0000> ',(Count),'</FONT><BR>
  1124.   <FONT COLOR=3D3C9CE3>Average Response Time: </FONT>
  1125.   <FONT COLOR=3DFF0000>',(avRT),' msec</FONT><BR>
  1126.   <FONT COLOR=3D3C9CE3>Average Throughput: </FONT>
  1127.   <FONT COLOR=3DFF0000>',(avTT),' kbps</FONT></B><HR WIDTH=3D100%>')
  1128.  }
  1129.  </SCRIPT>");
  1130.  winOpen();
  1131. }
  1132. //--></SCRIPT>
  1133. </HEAD>
  1134.  
  1135. <BODY TEXT=3D"#FFFF00" BGCOLOR=3D"#000000" LINK=3D"#00FFFF" VLINK=3D"#00F=
  1136. F00" =
  1137.  
  1138. ALINK=3D"#FF8000">
  1139.  
  1140.  
  1141. Stanislevic                                                    [Page 20]
  1142.  
  1143. I/D           End-to-End Testing With HTTP User Agents      August 1997
  1144.  
  1145.  
  1146. <!--Insert a description of the tests here in HTML-->
  1147.  
  1148. <CENTER><P><FONT COLOR=3D"#3C9CE3"><FONT SIZE=3D+2><B>Interactive =
  1149.  
  1150. Hypertext Transfer Tests</B> </FONT></FONT>
  1151. <HR WIDTH=3D"100%"></P></CENTER>
  1152.  
  1153. <P><FONT SIZE=3D+1>Cool HTTP User Response Time and Throughput Tests you =
  1154.  
  1155. can run with your browser! </FONT></P>
  1156.  
  1157. <SCRIPT><!--
  1158. /*Create Button objects and onClick Event Handlers.*/
  1159. document.write("<CENTER><P><FONT COLOR=3D'3C9CE3'><B><FONT SIZE=3D+2>
  1160. How to Run the Tests with JavaScript</FONT></B></FONT>
  1161. <HR WIDTH=3D'50%'></P></CENTER>
  1162.  
  1163. <P><FONT SIZE=3D+1>Navigator 3/4 JavaScript Users: Just select the =
  1164.  
  1165. test(s) you would like to run.</P>
  1166.  
  1167. <CENTER><P><FORM><INPUT type=3D'button' name=3D'button1' =
  1168.  
  1169. value=3D'Test Response Time Only' onClick=3D'testDelay()'> 
  1170. <INPUT type=3D'button' name=3D'button2' value=3D'Test Response Time and =
  1171.  
  1172. Throughput' onClick=3D'testThrpt()'></FORM></P></CENTER>
  1173. </FONT></P>")//--></SCRIPT>
  1174.  
  1175.  
  1176. (2) User Response Time Page (delay.htm)
  1177.  
  1178. <html>
  1179. <script>
  1180. o=3Dopen("","Rsl","scrollbars=3D1,menubar=3D1");
  1181. /*Call function A from the Results Window.*/
  1182. o.A();
  1183. </script>
  1184. </html>
  1185.  
  1186.  
  1187. (3) Combined User Data Throughput/Response Time Page (thrpt.htm)
  1188.  
  1189. <html>
  1190. <head>
  1191. <script>
  1192. o=3Dopen("","Rsl","scrollbars=3D1,menubar=3D1");
  1193. /*Call function aT from the Results Window.*/
  1194. o.aT();
  1195. </script>
  1196. </head>
  1197. <body text=3D"#ffff00" bgcolor=3D"#000000" link=3D"#00ffff" =
  1198.  
  1199. vlink=3D"#00ff00" alink=3D"#ff0000">
  1200.  
  1201.  
  1202.  
  1203. Stanislevic                                                    [Page 21]
  1204.  
  1205. I/D          End-to-End Testing With HTTP User Agents      August 1997
  1206.  
  1207.  
  1208. <script>
  1209. /*Call function T3 from the Results Window.*/
  1210. o.T3();
  1211. </script>
  1212.  
  1213. <!--96,000-Byte compressible test data sample (96,000 dots in an HTML =
  1214.  
  1215. comment tag, not displayed)..........................................-->
  1216.  
  1217. <script>
  1218. /*Call function T4 from the Results Window.*/
  1219. o.T4();
  1220. </script>
  1221.  
  1222. <center><p><b><br><br><br><br><font color=3D"#ff0000">
  1223. <font size=3D+4>DONE!</font></font></b><br></p></center>
  1224.  
  1225. <p><b>The Test will now restart automatically at random intervals =
  1226.  
  1227. averaging 120 seconds. If you prefer instead to STOP the test or =
  1228.  
  1229. run the test again NOW, click one of the buttons below: </b></p>
  1230.  
  1231. <!--Create Button objects and onClick Event Handlers.-->
  1232. <center>
  1233. <form><input type=3D'button' name=3D'button1' =
  1234.  
  1235. value=3D'STOP and Return to Test Menu' onClick=3D'o.uE()'</form> 
  1236. <form><input type=3D'button' name=3D'button2' value=3D'Run Test Again NOW=
  1237. ' =
  1238.  
  1239. onClick=3D'o.userReload()'</form>
  1240. </center>
  1241.  
  1242. <script>
  1243. /*Call function ifFirst from the Results Window.*/
  1244. o.ifFirst();
  1245. </script>
  1246. </body>
  1247. </html>
  1248.  
  1249. INTERNET-DRAFT           EXPIRES: FEB 1998          INTERNET-DRAFT
  1250.  
  1251.  
  1252.  
  1253.