Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-1211

cbc-cat should have an option to print documents to /dev/null

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 2.10.6
    • tools
    • None
    • 1

    Description

      cbc-cat should have an option to be used without printing the output to the terminal. 

      if you use it to diagnose number of documents fetch timings with -T, or if you just want to check if everything works as sort of an initial sanity you don't always interested with the actual document value.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          michael.reiche Michael Reiche added a comment - - edited

          Just printing the histogram to stderr would suffice.
          Then the document could be redirected to /dev/null and the document metadata and histogram would go to stderr.

          michael.reiche Michael Reiche added a comment - - edited Just printing the histogram to stderr would suffice. Then the document could be redirected to /dev/null and the document metadata and histogram would go to stderr.

           if a customer wants to use cat to see how fast couchbase is, they should use it with a single document argument. Multiple document arguments are processed in parallel. For example, if I retrieve 100 documents (in parallel) the timing histogram looks like this:
          [220 - 229 ]us |## - 1
          [240 - 249 ]us |#### - 2
          [250 - 259 ]us |#### - 2
          [260 - 269 ]us |################ - 7
          [280 - 289 ]us |## - 1
          [290 - 299 ]us |####### - 3
          [300 - 309 ]us |####### - 3
          [320 - 329 ]us |####### - 3
          [330 - 339 ]us |#### - 2
          [360 - 369 ]us |## - 1
          [370 - 379 ]us |#### - 2
          [380 - 389 ]us |#### - 2
          [390 - 399 ]us |######### - 4
          [410 - 419 ]us |#### - 2
          [420 - 429 ]us |####### - 3
          [430 - 439 ]us |#### - 2
          [460 - 469 ]us |####### - 3
          [470 - 479 ]us |#### - 2
          [480 - 489 ]us |####### - 3
          [490 - 499 ]us |## - 1
          [500 - 509 ]us |## - 1
          [510 - 519 ]us |####### - 3
          [520 - 529 ]us |#### - 2
          [530 - 539 ]us |####### - 3
          [570 - 579 ]us |#### - 2
          [580 - 589 ]us |######### - 4
          [590 - 599 ]us |#### - 2
          [600 - 609 ]us |####### - 3
          [610 - 619 ]us |####### - 3
          [620 - 629 ]us |## - 1
          [630 - 639 ]us |######### - 4
          [640 - 649 ]us |######### - 4
          [650 - 659 ]us |####### - 3
          [660 - 669 ]us |########### - 5
          [670 - 679 ]us |################################ - 14
          [680 - 689 ]us |################## - 8
          [690 - 699 ]us |################## - 8
          [700 - 709 ]us |####### - 3
          [710 - 719 ]us |####### - 3
          [720 - 729 ]us |########### - 5
          [730 - 739 ]us |####### - 3
          [740 - 749 ]us |#### - 2
          [750 - 759 ]us |################## - 8
          [760 - 769 ]us |####################### - 10
          [770 - 779 ]us |#### - 2
          [780 - 789 ]us |##################### - 9
          [790 - 799 ]us |######### - 4
          [800 - 809 ]us |##################### - 9
          [810 - 819 ]us |######################################## - 17
          [820 - 829 ]us |########### - 5
          [830 - 839 ]us |## - 1real 0m0.064s
          user 0m0.010s
          sys 0m0.005s
          but if I retrieve them serially, the timing histogam looks like this: (there is no cat option to do this, I had to modify the code)
          [40 - 49 ]us |######################################## - 46
          [50 - 59 ]us |########################### - 32
          [60 - 69 ]us |####### - 9
          [70 - 79 ]us |##### - 6
          [80 - 89 ]us |## - 3
          [90 - 99 ]us | - 1
          [100 - 109 ]us | - 1
          [110 - 119 ]us |# - 2
          [160 - 169 ]us | - 1
          real 0m0.314s
          user 0m0.010s
          sys 0m0.007s

          michael.reiche Michael Reiche added a comment -  if a customer wants to use cat to see how fast couchbase is, they should use it with a single document argument. Multiple document arguments are processed in parallel. For example, if I retrieve 100 documents (in parallel) the timing histogram looks like this: [220 - 229 ] us |## - 1 [240 - 249 ] us |#### - 2 [250 - 259 ] us |#### - 2 [260 - 269 ] us |################ - 7 [280 - 289 ] us |## - 1 [290 - 299 ] us |####### - 3 [300 - 309 ] us |####### - 3 [320 - 329 ] us |####### - 3 [330 - 339 ] us |#### - 2 [360 - 369 ] us |## - 1 [370 - 379 ] us |#### - 2 [380 - 389 ] us |#### - 2 [390 - 399 ] us |######### - 4 [410 - 419 ] us |#### - 2 [420 - 429 ] us |####### - 3 [430 - 439 ] us |#### - 2 [460 - 469 ] us |####### - 3 [470 - 479 ] us |#### - 2 [480 - 489 ] us |####### - 3 [490 - 499 ] us |## - 1 [500 - 509 ] us |## - 1 [510 - 519 ] us |####### - 3 [520 - 529 ] us |#### - 2 [530 - 539 ] us |####### - 3 [570 - 579 ] us |#### - 2 [580 - 589 ] us |######### - 4 [590 - 599 ] us |#### - 2 [600 - 609 ] us |####### - 3 [610 - 619 ] us |####### - 3 [620 - 629 ] us |## - 1 [630 - 639 ] us |######### - 4 [640 - 649 ] us |######### - 4 [650 - 659 ] us |####### - 3 [660 - 669 ] us |########### - 5 [670 - 679 ] us |################################ - 14 [680 - 689 ] us |################## - 8 [690 - 699 ] us |################## - 8 [700 - 709 ] us |####### - 3 [710 - 719 ] us |####### - 3 [720 - 729 ] us |########### - 5 [730 - 739 ] us |####### - 3 [740 - 749 ] us |#### - 2 [750 - 759 ] us |################## - 8 [760 - 769 ] us |####################### - 10 [770 - 779 ] us |#### - 2 [780 - 789 ] us |##################### - 9 [790 - 799 ] us |######### - 4 [800 - 809 ] us |##################### - 9 [810 - 819 ] us |######################################## - 17 [820 - 829 ] us |########### - 5 [830 - 839 ] us |## - 1real 0m0.064s user 0m0.010s sys 0m0.005s but if I retrieve them serially, the timing histogam looks like this: (there is no cat option to do this, I had to modify the code) [40 - 49 ] us |######################################## - 46 [50 - 59 ] us |########################### - 32 [60 - 69 ] us |####### - 9 [70 - 79 ] us |##### - 6 [80 - 89 ] us |## - 3 [90 - 99 ] us | - 1 [100 - 109 ] us | - 1 [110 - 119 ] us |# - 2 [160 - 169 ] us | - 1 real 0m0.314s user 0m0.010s sys 0m0.007s

          Michael Reiche, could you publish your modification to gerrit?

          avsej Sergey Avseyev added a comment - Michael Reiche , could you publish your modification to gerrit?
          michael.reiche Michael Reiche added a comment - - edited

          Modification is http://review.couchbase.org/c/libcouchbase/+/125286

          Simply not installing the callbacks might not be a good idea.  I suspect they free memory used by the response - I didn't check.

          michael.reiche Michael Reiche added a comment - - edited Modification is  http://review.couchbase.org/c/libcouchbase/+/125286 Simply not installing the callbacks might not be a good idea.  I suspect they free memory used by the response - I didn't check.

          People

            avsej Sergey Avseyev
            roi.katz Roi Katz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty