Today was a slow and not to productive day... Got our sandbox test machine up and
running with postgres and Perl-DBI installed and running. Aaron and I decided that
we needed a common file tree to make our modifications to for tpc-c so we created
a directory /clients/tpc-c/
and put all of our files there. Only disadvantage
to this method is that we have to use the ever so popular form of file locking...
"Hey!... Aaron, are you making changes to such-n'-such file?..." Other than that,
didn't get too much done today. Read some of the spec to attempt to determine more
about what it was that we were trying to do. Got the sql file modified for pgsql,
but had problems with reading it in and storing it in a variable to be sent to the
to the server via DBI. That was about all that happened today in my neck of the woods,
so hopefully tomorrow will be a slightly better (more productive) day.
As I had hoped, today was much more productive than yesterday. We were able to get a good number of the c functions that tpc-c used translated into perl. So-far, we have a Random Number (integer) generator, a sub to read in the sql file, and a Random Alpha Numeric String generator. We've started to generate a list of questions for Charlie about his code were we tripped up on how to understand it, so hopefully he can answer most (if not all) of them for us when he gets back on Thursday.
Got several more things done today. Finished most of the functions in the Support
module. We then found out that we are having problems with global variables. What we
need/want is a variable to live in tpc-mail.pl
but be completely
modifiable within subroutines called from main but that live in other modules/files.
I know there is a way to do this, but I can't seem to figure it out. We've tried using
package scoping but that didn't seem to work too well. We've also tried using
our
routine but that didn't seem to work either.
A good part of today was spent sitting around and waiting to talk to Charlie about his TPC-C code. Once we did, we finally got some answers to our questions. One of the things that he recommended is to do away with most of the global variables that he & Dave used in their code. He suggested that we return all of our needed values. For multiple values, it was mentioned that we could return a hash that contained the values that we needed. After our meeting, we were able to figure out one way of making the hash idea work. That was about all that happened today...
Worked some more on the TPC-C code. It still is no-where near done. We finally figured
out hashes and how to populate them which makes returning multiple variables much easier.
We were finally able to finish all of the remaining subroutines in SUPPORT.pm
and managed to get the main for load.pl
completed. We also continued working
on the LoadItems
subroutine which was one of the first things we started on,
then decided to postpone until we had more of the common functions completed. Haven't
had a chance to test any of our subroutines yet, but will probably get to that next week.