Refactoring pgbench.c

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Refactoring pgbench.c
Date: 2015-06-28 00:10:39
Message-ID: 20150628.091039.2168774469085761640.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Main pgbench logic consists of single file pgbench.c which is 4036
lines of code as of today. This is not a small number and I think it
would be nice if it is divided into smaller files because it will make
it easier to maintain, add or change features of pgbench. I will come
up with an idea how to split pgbench.c later. In the mean time I
attached a call graph of pgbench.c generated by egypt, which we could
get a basic idea how to split and modularize pgbench.c.

BTW, while looking at pgbench.c I noticed subtle coding problems:

1) strtoint64() should be decalred as static

2)
static
void
agg_vals_init(AggVals *aggs, instr_time start)

"static" and "void" should be one line, rather than separate 2 lines
according to our coding style.

I will commit fix for these if there's no objection.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
pgbench.gif image/gif 77.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-06-28 01:19:05 Re: pg_file_settings view vs. Windows
Previous Message Tom Lane 2015-06-27 23:20:43 Re: pg_file_settings view vs. Windows