Check firebird.log [no messages found for interval when this test was running]
Jump to: output_first_mismatch    outcomes_full_history    elapsed_time_chart
Show cross-report outcomes.

Annotation type Annotation details
2 @message
Performance problem

assert   
  - Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: acceptable
  + Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: /* perf_issue_tag */ UNACCEPTABLE:         0.55 -- greater than threshold =         0.55
  + Check result of 21 measures:
  + 0 :         0.49
  + 1 :         0.60
  + 2 :         0.54
  + 3 :         0.54
  + 4 :         0.55
  + 5 :         0.56
  + 6 :         0.56
  + 7 :         0.58
  + 8 :         0.57
  + 9 :         0.52
  + 10 :         0.54
  + 11 :         0.53
  + 12 :         0.55
  + 13 :         0.54
  + 14 :         0.60
  + 15 :         0.56
  + 16 :         0.57
  + 17 :         0.47
  + 18 :         0.43
  + 19 :         0.50
  + 20 :         0.57
    Median value for 21 ratios of commit_time/compile_time when create 1500 standalone PSQL objects: acceptable

LOG DETAILS:

2025-06-26 18:56:38.147
2025-06-26 18:56:38.151 act = <firebird.qa.plugin.Action object at [hex]>
2025-06-26 18:56:38.156 capsys = <_pytest.capture.CaptureFixture object at [hex]>
2025-06-26 18:56:38.160
2025-06-26 18:56:38.165 @pytest.mark.version('>=3.0')
2025-06-26 18:56:38.169 def test_1(act: Action, capsys):
2025-06-26 18:56:38.173
2025-06-26 18:56:38.178 act.db.set_async_write() # just to be sure, although this is by default
2025-06-26 18:56:38.183
2025-06-26 18:56:38.188 expected_stdout = f"""
2025-06-26 18:56:38.193 Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} packaged PSQL objects: acceptable
2025-06-26 18:56:38.198 Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} standalone PSQL objects: acceptable
2025-06-26 18:56:38.203 """
2025-06-26 18:56:38.209
2025-06-26 18:56:38.215 func_headers_ddl = ''.join( [ '\n  function fn_%d returns int;' % i for i in range(N_LIMIT) ] )
2025-06-26 18:56:38.221 func_bodies_ddl = ''.join( [ '\n  function fn_%d returns int as begin return %d; end' % (i,i) for i in range(N_LIMIT) ] )
2025-06-26 18:56:38.227
2025-06-26 18:56:38.235 pkg_header_ddl = '\n'.join( ('create or alter package huge as\nbegin', func_headers_ddl, 'end') )
2025-06-26 18:56:38.248 pkg_body_ddl = '\n'.join( ('recreate package body huge as\nbegin', func_bodies_ddl, 'end') )
2025-06-26 18:56:38.255
2025-06-26 18:56:38.262 sp_time = {}
2025-06-26 18:56:38.267 with act.db.connect() as con:
2025-06-26 18:56:38.272
2025-06-26 18:56:38.279 with con.cursor() as cur:
2025-06-26 18:56:38.284 cur.execute('select mon$server_pid as p from mon$attachments where mon$attachment_id = current_connection')
2025-06-26 18:56:38.290 fb_pid = int(cur.fetchone()[0])
2025-06-26 18:56:38.298
2025-06-26 18:56:38.304 for i in range(0, N_MEASURES):
2025-06-26 18:56:38.310 for ftype in ('packaged', 'standalone'):
2025-06-26 18:56:38.316
2025-06-26 18:56:38.322 fb_info_a = psutil.Process(fb_pid).cpu_times()
2025-06-26 18:56:38.328 if ftype == 'packaged':
2025-06-26 18:56:38.333 con.execute_immediate(pkg_header_ddl)
2025-06-26 18:56:38.339 con.execute_immediate(pkg_body_ddl)
2025-06-26 18:56:38.345 else:
2025-06-26 18:56:38.351 for k in range(0,N_LIMIT):
2025-06-26 18:56:38.362 con.execute_immediate( 'create or alter function sf_%d returns int as begin return %d; end' % (k,k)  )
2025-06-26 18:56:38.369
2025-06-26 18:56:38.375 fb_info_b = psutil.Process(fb_pid).cpu_times()
2025-06-26 18:56:38.382 con.commit()
2025-06-26 18:56:38.387 fb_info_c = psutil.Process(fb_pid).cpu_times()
2025-06-26 18:56:38.394
2025-06-26 18:56:38.401 cpu_time_for_compile = max(fb_info_b.user - fb_info_a.user, 0.000001)
2025-06-26 18:56:38.408 cpu_time_for_commit = fb_info_c.user - fb_info_b.user
2025-06-26 18:56:38.420
2025-06-26 18:56:38.433 sp_time[ ftype, i ]  = cpu_time_for_commit / cpu_time_for_compile
2025-06-26 18:56:38.444
2025-06-26 18:56:38.454 commit_2_compile_ratio_for_package = [round(v,2) for k,v in sp_time.items() if k[0] == 'packaged']
2025-06-26 18:56:38.463 commit_2_compile_ratio_for_standal = [round(v,2) for k,v in sp_time.items() if k[0] == 'standalone']
2025-06-26 18:56:38.469
2025-06-26 18:56:38.475 actual_time_ratios_commit2compile = { 'packaged' : median(commit_2_compile_ratio_for_package), 'standalone': median(commit_2_compile_ratio_for_standal) }
2025-06-26 18:56:38.481
2025-06-26 18:56:38.487 for ftype in ('packaged', 'standalone'):
2025-06-26 18:56:38.492 msg = f"Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} {ftype} PSQL objects: "
2025-06-26 18:56:38.499 if actual_time_ratios_commit2compile[ ftype ] < MAX_TIME_RATIOS_COMMIT_TO_COMPILE[ ftype ]:
2025-06-26 18:56:38.505 print( msg + 'acceptable')
2025-06-26 18:56:38.513 else:
2025-06-26 18:56:38.526 print( msg + '/* perf_issue_tag */ UNACCEPTABLE: %12.2f -- greater than threshold = %12.2f' % (actual_time_ratios_commit2compile[ ftype ],  MAX_TIME_RATIOS_COMMIT_TO_COMPILE[ ftype ]) )
2025-06-26 18:56:38.537 print( 'Check result of %d measures:' % N_MEASURES )
2025-06-26 18:56:38.545
2025-06-26 18:56:38.557 # List with concrete values (source for median evaluation):
2025-06-26 18:56:38.568 lst = commit_2_compile_ratio_for_package if ftype == 'packaged' else commit_2_compile_ratio_for_standal
2025-06-26 18:56:38.577 for i,p in enumerate(lst):
2025-06-26 18:56:38.583 print('%3d' % i, ':', '%12.2f' % p)
2025-06-26 18:56:38.591
2025-06-26 18:56:38.601
2025-06-26 18:56:38.610 act.expected_stdout = expected_stdout
2025-06-26 18:56:38.620 act.stdout = capsys.readouterr().out
2025-06-26 18:56:38.631 >       assert act.clean_stdout == act.clean_expected_stdout
2025-06-26 18:56:38.640 E       assert
2025-06-26 18:56:38.648 E         - Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: acceptable
2025-06-26 18:56:38.655 E         + Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: /* perf_issue_tag */ UNACCEPTABLE:         0.55 -- greater than threshold =         0.55
2025-06-26 18:56:38.661 E         + Check result of 21 measures:
2025-06-26 18:56:38.667 E         + 0 :         0.49
2025-06-26 18:56:38.674 E         + 1 :         0.60
2025-06-26 18:56:38.686 E         + 2 :         0.54
2025-06-26 18:56:38.694 E         + 3 :         0.54
2025-06-26 18:56:38.703 E         + 4 :         0.55
2025-06-26 18:56:38.711 E         + 5 :         0.56
2025-06-26 18:56:38.718 E         + 6 :         0.56
2025-06-26 18:56:38.726 E         + 7 :         0.58
2025-06-26 18:56:38.732 E         + 8 :         0.57
2025-06-26 18:56:38.738 E         + 9 :         0.52
2025-06-26 18:56:38.743 E         + 10 :         0.54
2025-06-26 18:56:38.749 E         + 11 :         0.53
2025-06-26 18:56:38.755 E         + 12 :         0.55
2025-06-26 18:56:38.760 E         + 13 :         0.54
2025-06-26 18:56:38.766 E         + 14 :         0.60
2025-06-26 18:56:38.772 E         + 15 :         0.56
2025-06-26 18:56:38.777 E         + 16 :         0.57
2025-06-26 18:56:38.783 E         + 17 :         0.47
2025-06-26 18:56:38.789 E         + 18 :         0.43
2025-06-26 18:56:38.795 E         + 19 :         0.50
2025-06-26 18:56:38.802 E         + 20 :         0.57
2025-06-26 18:56:38.814 E           Median value for 21 ratios of commit_time/compile_time when create 1500 standalone PSQL objects: acceptable
2025-06-26 18:56:38.824
2025-06-26 18:56:38.832 tests/bugs/core_4880_test.py:164: AssertionError
2025-06-26 18:56:38.839 ---------------------------- Captured stdout setup -----------------------------
2025-06-26 18:56:38.845 Creating db: localhost:/var/tmp/qa_2024/test_1972/test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]
3 #text
act = <firebird.qa.plugin.Action pytest object at [hex]>
capsys = <_pytest.capture.CaptureFixture pytest object at [hex]>

    @pytest.mark.version('>=3.0')
    def test_1(act: Action, capsys):
    
        act.db.set_async_write() # just to be sure, although this is by default
    
        expected_stdout = f"""
            Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} packaged PSQL objects: acceptable
            Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} standalone PSQL objects: acceptable
        """
    
        func_headers_ddl = ''.join( [ '\n  function fn_%d returns int;' % i for i in range(N_LIMIT) ] )
        func_bodies_ddl = ''.join( [ '\n  function fn_%d returns int as begin return %d; end' % (i,i) for i in range(N_LIMIT) ] )
    
        pkg_header_ddl = '\n'.join( ('create or alter package huge as\nbegin', func_headers_ddl, 'end') )
        pkg_body_ddl = '\n'.join( ('recreate package body huge as\nbegin', func_bodies_ddl, 'end') )
    
        sp_time = {}
        with act.db.connect() as con:
    
            with con.cursor() as cur:
                cur.execute('select mon$server_pid as p from mon$attachments where mon$attachment_id = current_connection')
                fb_pid = int(cur.fetchone()[0])
    
            for i in range(0, N_MEASURES):
                for ftype in ('packaged', 'standalone'):
    
                    fb_info_a = psutil.Process(fb_pid).cpu_times()
                    if ftype == 'packaged':
                        con.execute_immediate(pkg_header_ddl)
                        con.execute_immediate(pkg_body_ddl)
                    else:
                        for k in range(0,N_LIMIT):
                            con.execute_immediate( 'create or alter function sf_%d returns int as begin return %d; end' % (k,k)  )
    
                    fb_info_b = psutil.Process(fb_pid).cpu_times()
                    con.commit()
                    fb_info_c = psutil.Process(fb_pid).cpu_times()
    
                    cpu_time_for_compile = max(fb_info_b.user - fb_info_a.user, 0.000001)
                    cpu_time_for_commit = fb_info_c.user - fb_info_b.user
    
                    sp_time[ ftype, i ]  = cpu_time_for_commit / cpu_time_for_compile
    
        commit_2_compile_ratio_for_package = [round(v,2) for k,v in sp_time.items() if k[0] == 'packaged']
        commit_2_compile_ratio_for_standal = [round(v,2) for k,v in sp_time.items() if k[0] == 'standalone']
    
        actual_time_ratios_commit2compile = { 'packaged' : median(commit_2_compile_ratio_for_package), 'standalone': median(commit_2_compile_ratio_for_standal) }
    
        for ftype in ('packaged', 'standalone'):
            msg = f"Median value for {N_MEASURES} ratios of commit_time/compile_time when create {N_LIMIT} {ftype} PSQL objects: "
            if actual_time_ratios_commit2compile[ ftype ] < MAX_TIME_RATIOS_COMMIT_TO_COMPILE[ ftype ]:
                print( msg + 'acceptable')
            else:
                print( msg + '/* perf_issue_tag */ UNACCEPTABLE: %12.2f -- greater than threshold = %12.2f' % (actual_time_ratios_commit2compile[ ftype ],  MAX_TIME_RATIOS_COMMIT_TO_COMPILE[ ftype ]) )
                print( 'Check result of %d measures:' % N_MEASURES )
    
                # List with concrete values (source for median evaluation):
                lst = commit_2_compile_ratio_for_package if ftype == 'packaged' else commit_2_compile_ratio_for_standal
                for i,p in enumerate(lst):
                    print('%3d' % i, ':', '%12.2f' % p)
    
    
        act.expected_stdout = expected_stdout
        act.stdout = capsys.readouterr().out
>       assert act.clean_stdout == act.clean_expected_stdout
E       assert   
E         - Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: acceptable
E         + Median value for 21 ratios of commit_time/compile_time when create 1500 packaged PSQL objects: /* perf_issue_tag */ UNACCEPTABLE:         0.55 -- greater than threshold =         0.55
E         + Check result of 21 measures:
E         + 0 :         0.49
E         + 1 :         0.60
E         + 2 :         0.54
E         + 3 :         0.54
E         + 4 :         0.55
E         + 5 :         0.56
E         + 6 :         0.56
E         + 7 :         0.58
E         + 8 :         0.57
E         + 9 :         0.52
E         + 10 :         0.54
E         + 11 :         0.53
E         + 12 :         0.55
E         + 13 :         0.54
E         + 14 :         0.60
E         + 15 :         0.56
E         + 16 :         0.57
E         + 17 :         0.47
E         + 18 :         0.43
E         + 19 :         0.50
E         + 20 :         0.57
E           Median value for 21 ratios of commit_time/compile_time when create 1500 standalone PSQL objects: acceptable

tests/bugs/core_4880_test.py:164: AssertionError
Full history of outcomes and elapsed time, ms:
NN SNAP_INFO CS_outcome SS_outcome CS_run_time SS_run_time CS_run_beg CS_run_end SS_run_beg SS_run_end
1 3.0.13.33809 2025.05.06 28ad0 P F 308966 166248 2025.06.26 16:22:56.404 2025.06.26 16:28:05.370 2025.06.26 15:33:49.668 2025.06.26 15:36:35.916
2 3.0.13.33808 2025.04.25 28426 P P 382656 209281 2025.05.06 13:44:17.637 2025.05.06 13:50:40.293 2025.05.06 12:45:53.078 2025.05.06 12:49:22.359
3 3.0.13.33803 2025.02.25 08ebd P P 389495 214526 2025.04.25 16:59:13.535 2025.04.25 17:05:43.030 2025.04.25 16:01:19.104 2025.04.25 16:04:53.630
4 3.0.13.33796 2025.01.29 0ab85 P P 1599 1095 2025.02.25 15:38:20.044 2025.02.25 15:38:21.643 2025.02.25 14:37:36.246 2025.02.25 14:37:37.341
5 3.0.13.33796 2025.01.14 99b3b P P 1489 1058 2025.01.28 17:52:47.336 2025.01.28 17:52:48.825 2025.01.28 16:50:19.091 2025.01.28 16:50:20.149
6 3.0.13.33795 2024.11.24 b8847 P P 1504 1003 2025.01.13 15:30:06.609 2025.01.13 15:30:08.113 2025.01.13 14:28:37.945 2025.01.13 14:28:38.948
7 3.0.13.33794 2024.10.15 abe09 P F 1174 836 2024.11.23 06:35:08.227 2024.11.23 06:35:09.401 2024.11.23 05:49:01.126 2024.11.23 05:49:01.962
8 3.0.13.33793 2024.10.04 82ccc P F 1467 819 2024.10.14 04:31:06.509 2024.10.14 04:31:07.976 2024.10.14 03:40:36.571 2024.10.14 03:40:37.390
9 3.0.13.33792 2024.08.31 d8791 P P 1375 940 2024.10.03 09:38:07.659 2024.10.03 09:38:09.034 2024.10.03 08:44:00.794 2024.10.03 08:44:01.734
10 3.0.13.33787 2024.08.17 2e0d6 P P 3515 1796 2024.08.25 15:30:37.577 2024.08.25 15:30:41.092 2024.08.25 13:32:59.556 2024.08.25 13:33:01.352
11 3.0.13.33787 2024.08.09 df740 P P 1521 929 2024.08.16 12:54:10.713 2024.08.16 12:54:12.234 2024.08.16 11:52:54.266 2024.08.16 11:52:55.195
12 3.0.12.33746 2024.07.15 11dd4 P F 2349 1503 2024.08.09 12:49:36.076 2024.08.09 12:49:38.425 2024.08.09 11:47:28.816 2024.08.09 11:47:30.319
13 3.0.12.33746 2024.06.11 8a5eb P P 1154 801 2024.07.15 10:41:35.376 2024.07.15 10:41:36.530 2024.07.15 09:49:16.331 2024.07.15 09:49:17.132
14 3.0.12.33744 2024.05.09 9cf37 P F 1689 1115 2024.05.12 15:47:52.209 2024.05.12 15:47:53.898 2024.05.12 15:00:50.465 2024.05.12 15:00:51.580
15 3.0.12.33744 2024.04.20 af6b2 P F 1099 818 2024.05.08 17:03:26.457 2024.05.08 17:03:27.556 2024.05.08 16:18:31.096 2024.05.08 16:18:31.914

Elapsed time, ms. Chart for last 15 runs:

Last commits information (all timestamps in UTC):