skip to Main Content

I’m currently working on making modifications to the source code of the Apache AGE extension for PostgreSQL, and I’m interested in performing some benchmarks to evaluate the impacts of my changes.

Apache AGE uses a series of regression tests, which I’ve been executing via the make installcheck command.

So I would like to know from where in the source code of Postgres the following results are printed, so I can modify it for my benchmarking purposes:


============== creating temporary instance            ==============
============== initializing database system           ==============
============== starting postmaster                    ==============
running on port 61958 with PID 3343
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
============== installing age                         ==============
CREATE EXTENSION
============== running regression test queries        ==============
test scan                         ... ok          240 ms
test graphid                      ... ok           21 ms
test agtype                       ... ok          198 ms
test catalog                      ... ok          116 ms
test cypher                       ... ok           32 ms
test expr                         ... ok          627 ms
test cypher_create                ... ok          125 ms
test cypher_match                 ... ok          517 ms
test cypher_unwind                ... ok           62 ms
test cypher_set                   ... ok          148 ms
test cypher_remove                ... ok          103 ms
test cypher_delete                ... ok          120 ms
test cypher_with                  ... ok           89 ms
test cypher_vle                   ... ok         1166 ms
test cypher_union                 ... ok           42 ms
test cypher_call                  ... ok           61 ms
test cypher_merge                 ... ok          223 ms
test age_global_graph             ... ok          172 ms
test age_load                     ... ok         1830 ms
test index                        ... ok           98 ms
test analyze                      ... ok           35 ms
test graph_generation             ... ok           82 ms
test name_validation              ... ok          166 ms
test drop                         ... ok          236 ms
============== shutting down postmaster               ==============
============== removing temporary instance            ==============

======================
 All 24 tests passed. 
======================

Any advice or insights from those who have experience modifying PostgreSQL extension regression tests would be greatly appreciated. Thank you!

3

Answers


  1. In the regress folder you will find test cases and their output.
    The structure is as follows:

    • age_load: Has data which is used
    • expected: Has expected output of the test cases.
    • sql: Has all the test cases written in .sql files.

    You can modify the files in sql folder.

    Login or Signup to reply.
  2. The regression tests are found in the regress directory of Apache AGE repo.

    The subdirectories ./expected and ./sql contain files that tests the extensions. Specifically expr.out and expr.sql, these files tests various functions.

    Login or Signup to reply.
  3. The tests itself are done through PostgreSQL’s test strategy and Apache AGE make use of it, which means Apache AGE are following the same schema/structure of the tests and seeds the scripts to be tested inside the PostgreSQL server.

    To add a new testing script simply you can do the following

    • Locate it under the correct directory like the following age/regress/sql/$(your_script.sql)
    • Add that to the list of REGRESS in age/Makefile
    • Run the tests (it will fail) copy the results of your script to the expected directory under regress after revising and making sure of it.
    • Run again (it should pass now)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search