github.com/tampajohn/gosnowflake@v1.1.1/benchmark/largesetresult/README.rst (about)

     1  ********************************************************************************
     2  Benchmark Large Result Set
     3  ********************************************************************************
     4  
     5  This folder includes a benchmark test case for "Large Result set", which refers 
     6  to the query result more than 100 MB as Snowflake clients fetches the first small 
     7  chunk of data (~100MB) from Snowflake DB and downloads the rest of data chunks 
     8  from AWS S3 bucket.
     9  
    10  Profiling
    11  =========
    12  
    13  Using Go's profilers, you may see CPU and memory usage on each function/method. 
    14  This command instruments CPU and memory usage and save them into files.
    15  
    16  .. code-block:: bash
    17  
    18      SNOWFLAKE_TEST_ACCOUNT=<your_account> \
    19      SNOWFLAKE_TEST_USER=<your_user> \
    20      SNOWFLAKE_TEST_PASSWORD=<your_password> \
    21      make profile
    22  
    23  Check CPU usage on the web browser:
    24  
    25  .. code-block:: bash
    26  
    27      go tool pprof largesetresult.test cpu.out
    28      (pprof) web
    29  
    30  Check memory usage on the web browser:
    31  
    32  .. code-block:: bash
    33  
    34      go tool pprof -alloc_space largesetresult.test mem.out
    35      (pprof) web
    36  
    37  Tracing
    38  =======
    39  
    40  Using Go's trace tool, you may see all of the goroutine's activity with timeline.
    41  
    42  .. code-block:: bash
    43  
    44      SNOWFLAKE_TEST_ACCOUNT=<your_account> \
    45      SNOWFLAKE_TEST_USER=<your_user> \
    46      SNOWFLAKE_TEST_PASSWORD=<your_password> \
    47      make trace
    48  
    49  Check goroutine's activities on web browser.
    50  
    51  .. code-block:: bash
    52  
    53      go tool trace largesetresult.test trace.out
    54  
    55