Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print outputs on console #74

Open
chatman opened this issue Jun 20, 2023 · 0 comments
Open

Pretty print outputs on console #74

chatman opened this issue Jun 20, 2023 · 0 comments

Comments

@chatman
Copy link
Collaborator

chatman commented Jun 20, 2023

Upon a successful execution, results are written to a JSON file and also printed as follows:

2023-06-20 13:48:12 INFO  StressMain:221 - Final results: {task1=[{end-time=475.336, init-timestamp=1687248402433, 
end-timestamp=1687248877769, start-timestamp=1687248402496, start-time=0.063, total-time=472.711832794}], 
task2=[{total-time=9.968, start-time=475.343, node-shutdown=3.193, end-time=485.311, end-
timestamp=1687248887744, heap-mb=-1.0, node-startup=6.604, init-timestamp=1687248402433, start-
timestamp=1687248877776}, {total-time=20.342, start-time=485.313, node-shutdown=13.55, end-time=505.655, end-
timestamp=1687248908088, heap-mb=-1.0, node-startup=6.639, init-timestamp=1687248402433, start-
timestamp=1687248887746}, {total-time=10.065, start-time=505.658, node-shutdown=3.258, end-time=515.723, end-
timestamp=1687248918156, heap-mb=-1.0, node-startup=6.648, init-timestamp=1687248402433, start-
timestamp=1687248908091}], task3=[{timings=[{threads=1, 50th=3.1585055000000004, 90th=69.55851529999995, 
95th=210.11235779999993, mean=33.322745040562246, total-queries=4980, total-time=173908}], start-time=515.741, 
total-time=173944, start-timestamp=1687248918174, init-timestamp=1687248402433, end-time=689.685, end-
timestamp=1687249092118}]}

In OpenSearch-Benchmarks, the output is a pretty print like this:

        _______             __   _____
       / ____(_)___  ____ _/ /  / ___/_________  ________
      / /_  / / __ \/ __ `/ /   \__ \/ ___/ __ \/ ___/ _ \
     / __/ / / / / / /_/ / /   ___/ / /__/ /_/ / /  /  __/
    /_/   /_/_/ /_/\__,_/_/   /____/\___/\____/_/   \___/
    ------------------------------------------------------

    |                         Metric |                 Task |     Value |   Unit |
    |-------------------------------:|---------------------:|----------:|-------:|
    |            Total indexing time |                      |   28.0997 |    min |
    |               Total merge time |                      |   6.84378 |    min |
    |             Total refresh time |                      |   3.06045 |    min |
    |               Total flush time |                      |  0.106517 |    min |
    |      Total merge throttle time |                      |   1.28193 |    min |
    |               Median CPU usage |                      |     471.6 |      % |
    |             Total Young Gen GC |                      |    16.237 |      s |
    |               Total Old Gen GC |                      |     1.796 |      s |
    |                     Index size |                      |   2.60124 |     GB |
    |                  Total written |                      |   11.8144 |     GB |
    |         Heap used for segments |                      |   14.7326 |     MB |
    |       Heap used for doc values |                      |  0.115917 |     MB |
    |            Heap used for terms |                      |   13.3203 |     MB |
    |            Heap used for norms |                      | 0.0734253 |     MB |
    |           Heap used for points |                      |    0.5793 |     MB |
    |    Heap used for stored fields |                      |  0.643608 |     MB |
    |                  Segment count |                      |        97 |        |
    |                 Min Throughput |         index-append |   31925.2 | docs/s |
    |              Median Throughput |         index-append |   39137.5 | docs/s |
    |                 Max Throughput |         index-append |   39633.6 | docs/s |
    |      50.0th percentile latency |         index-append |   872.513 |     ms |
    |      90.0th percentile latency |         index-append |   1457.13 |     ms |
    |      99.0th percentile latency |         index-append |   1874.89 |     ms |
    |       100th percentile latency |         index-append |   2711.71 |     ms |
    | 50.0th percentile service time |         index-append |   872.513 |     ms |
    | 90.0th percentile service time |         index-append |   1457.13 |     ms |
    | 99.0th percentile service time |         index-append |   1874.89 |     ms |
    |  100th percentile service time |         index-append |   2711.71 |     ms |
    |                           ...  |                  ... |       ... |    ... |
    |                           ...  |                  ... |       ... |    ... |
    |                 Min Throughput |     painless_dynamic |   2.53292 |  ops/s |
    |              Median Throughput |     painless_dynamic |   2.53813 |  ops/s |
    |                 Max Throughput |     painless_dynamic |   2.54401 |  ops/s |
    |      50.0th percentile latency |     painless_dynamic |    172208 |     ms |
    |      90.0th percentile latency |     painless_dynamic |    310401 |     ms |
    |      99.0th percentile latency |     painless_dynamic |    341341 |     ms |
    |      99.9th percentile latency |     painless_dynamic |    344404 |     ms |
    |       100th percentile latency |     painless_dynamic |    344754 |     ms |
    | 50.0th percentile service time |     painless_dynamic |    393.02 |     ms |
    | 90.0th percentile service time |     painless_dynamic |   407.579 |     ms |
    | 99.0th percentile service time |     painless_dynamic |   430.806 |     ms |
    | 99.9th percentile service time |     painless_dynamic |   457.352 |     ms |
    |  100th percentile service time |     painless_dynamic |   459.474 |     ms |

We can easily adopt this tabular printing for better user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant