- Notifications
You must be signed in to change notification settings - Fork5k
Commit16827d4
committed
pgbench: fix stats reporting when some transactions are skipped.
pgbench can skip some transactions when both -R and -L options are used.Previously, this resulted in slightly silly statistics both in progressreports and final output, because the skipped transactions were countedas executed for TPS and related stats. Discount skipped xacts in TPSnumbers, and also when figuring the percentage of xacts exceeding thelatency limit.Also, don't print per-script skipped-transaction counts when there isonly one script. That's redundant with the overall count, and it'sinconsistent with the fact that we don't print other per-script statswhen there's only one script. Clean up some unnecessary interactionsbetween what should be independent options that were due to thatdecision.While at it, avoid division-by-zero in cases where no transactions wereexecuted. While on modern platforms this would generally result inprinting "NaN" rather than a crash, that isn't spelled consistentlyacross platforms and it would confuse many people. Skip the relevantoutput entirely when practical, else print zeroes.Fabien Coelho, reviewed by Steve Singer, additional hacking by meDiscussion:https://postgr.es/m/26654.1505232433@sss.pgh.pa.us1 parent4176126 commit16827d4
File tree
3 files changed
+65
-44
lines changed- doc/src/sgml/ref
- src/bin/pgbench
- t
3 files changed
+65
-44
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1363 | 1363 |
| |
1364 | 1364 |
| |
1365 | 1365 |
| |
1366 |
| - | |
1367 |
| - | |
| 1366 | + | |
1368 | 1367 |
| |
1369 | 1368 |
| |
1370 | 1369 |
| |
|
Lines changed: 63 additions & 41 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3664 | 3664 |
| |
3665 | 3665 |
| |
3666 | 3666 |
| |
3667 |
| - | |
3668 |
| - | |
3669 |
| - | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
3670 | 3671 |
| |
3671 |
| - | |
3672 |
| - | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
3673 | 3675 |
| |
3674 | 3676 |
| |
3675 | 3677 |
| |
3676 | 3678 |
| |
3677 | 3679 |
| |
3678 |
| - | |
| 3680 | + | |
3679 | 3681 |
| |
3680 | 3682 |
| |
3681 | 3683 |
| |
3682 | 3684 |
| |
| 3685 | + | |
3683 | 3686 |
| |
3684 | 3687 |
| |
3685 |
| - | |
3686 |
| - | |
3687 |
| - | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
3688 | 3693 |
| |
3689 | 3694 |
| |
3690 | 3695 |
| |
| |||
3697 | 3702 |
| |
3698 | 3703 |
| |
3699 | 3704 |
| |
3700 |
| - | |
| 3705 | + | |
3701 | 3706 |
| |
3702 | 3707 |
| |
3703 | 3708 |
| |
3704 | 3709 |
| |
3705 | 3710 |
| |
3706 |
| - | |
| 3711 | + | |
3707 | 3712 |
| |
3708 | 3713 |
| |
3709 | 3714 |
| |
| |||
3716 | 3721 |
| |
3717 | 3722 |
| |
3718 | 3723 |
| |
3719 |
| - | |
3720 |
| - | |
3721 |
| - | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
3722 | 3727 |
| |
3723 | 3728 |
| |
3724 | 3729 |
| |
| |||
3745 | 3750 |
| |
3746 | 3751 |
| |
3747 | 3752 |
| |
3748 |
| - | |
| 3753 | + | |
3749 | 3754 |
| |
3750 | 3755 |
| |
3751 | 3756 |
| |
3752 | 3757 |
| |
3753 | 3758 |
| |
3754 |
| - | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
3755 | 3763 |
| |
3756 | 3764 |
| |
3757 | 3765 |
| |
3758 | 3766 |
| |
3759 | 3767 |
| |
3760 | 3768 |
| |
3761 |
| - | |
3762 |
| - | |
3763 |
| - | |
3764 |
| - | |
3765 |
| - | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
3766 | 3772 |
| |
3767 |
| - | |
3768 |
| - | |
3769 |
| - | |
3770 |
| - | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
3771 | 3777 |
| |
3772 |
| - | |
3773 |
| - | |
| 3778 | + | |
| 3779 | + | |
3774 | 3780 |
| |
3775 | 3781 |
| |
3776 | 3782 |
| |
3777 | 3783 |
| |
3778 | 3784 |
| |
3779 | 3785 |
| |
3780 |
| - | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
3781 | 3790 |
| |
3782 | 3791 |
| |
3783 | 3792 |
| |
3784 | 3793 |
| |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
3785 | 3797 |
| |
3786 |
| - | |
3787 |
| - | |
| 3798 | + | |
| 3799 | + | |
3788 | 3800 |
| |
| 3801 | + | |
3789 | 3802 |
| |
3790 | 3803 |
| |
3791 | 3804 |
| |
| |||
3984 | 3997 |
| |
3985 | 3998 |
| |
3986 | 3999 |
| |
3987 |
| - | |
3988 | 4000 |
| |
3989 | 4001 |
| |
3990 | 4002 |
| |
| |||
4861 | 4873 |
| |
4862 | 4874 |
| |
4863 | 4875 |
| |
4864 |
| - | |
| 4876 | + | |
| 4877 | + | |
4865 | 4878 |
| |
4866 | 4879 |
| |
4867 | 4880 |
| |
| |||
4876 | 4889 |
| |
4877 | 4890 |
| |
4878 | 4891 |
| |
4879 |
| - | |
| 4892 | + | |
4880 | 4893 |
| |
4881 | 4894 |
| |
4882 | 4895 |
| |
| |||
4890 | 4903 |
| |
4891 | 4904 |
| |
4892 | 4905 |
| |
| 4906 | + | |
| 4907 | + | |
4893 | 4908 |
| |
4894 |
| - | |
4895 |
| - | |
4896 |
| - | |
4897 |
| - | |
4898 |
| - | |
4899 |
| - | |
4900 |
| - | |
4901 |
| - | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
4902 | 4921 |
| |
4903 | 4922 |
| |
4904 | 4923 |
| |
| |||
4915 | 4934 |
| |
4916 | 4935 |
| |
4917 | 4936 |
| |
| 4937 | + | |
| 4938 | + | |
4918 | 4939 |
| |
| 4940 | + | |
4919 | 4941 |
| |
4920 | 4942 |
| |
4921 | 4943 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
427 | 427 |
| |
428 | 428 |
| |
429 | 429 |
| |
430 |
| - | |
| 430 | + | |
431 | 431 |
| |
432 | 432 |
| |
433 | 433 |
| |
|
0 commit comments
Comments
(0)