Refactoring pgbench.c - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Refactoring pgbench.c
Date
Msg-id 20150628.091039.2168774469085761640.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: Refactoring pgbench.c  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: Refactoring pgbench.c  (Jeff Janes <jeff.janes@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_file_settings view vs. Windows
Next
From: Michael Paquier
Date:
Subject: Re: pg_file_settings view vs. Windows