GMOD

Gbrowse Benchmarking

Using Javascript to Benchmark Gbrowse Image Generation and Loading

The following recipe shows how to use existing options, such as head, html2, etc., to add javascript functionality to GBrowse via the configuration file. This example is used for benchmarking page loading and image generation.

BenchMark.png

First Step: Adding a simple script to the page header

head=  <script type="text/javascript">
         var d = new Date();
         var start = d.getTime()/1000;
        </script>

Next Step: Inserting Time Stamps into the Gbrowse Output

html3 = <h1 id=html3>placeholder</h1>
        <script>
          var d  = new Date();
          var e  = d.getTime()/1000 - start;
          var re = Math.round(e*100)/100;
          document.getElementById('html3').innerHTML='Load time '+re+' seconds';
        </script>

Categories:

Documentation

Community

Tools