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