HPCE / hpce-2016-cw5

0 stars 2 forks source link

Bug: Consistency of logging #15

Closed jeremych1000 closed 7 years ago

jeremych1000 commented 7 years ago

I wrote a timing script to automate timing the different implementations. However, there are wording inconsistencies in the puzzles which are confusing. I detect when the log says 'Starting ' and 'Finished'.

Would it be possible to standardize this logging line across all puzzles?

Puzzle Word Comment Line
ising_spin Starting steps. OK 217
ising_spin Finished OK 256
random_walk Starting random walks OK 159
random_walk Finished OK 191
julia Starting OK 137
julia Finished OK 166
logic_sim About to start running clock cycles (total = %d) Not OK - consider changing to 'Starting clock cycles'? 125
logic_sim Starting iteration %d of %d\n Not OK - in a for loop, so prints a lot of times - consider changing to 'Executing itereation'? 128
logic_sim Finished clock cycles OK 141
m8pple commented 7 years ago

It's not really a bug, though I'm reasonably open to this in the name of standardisation (logs generally be consistent so that you can grep/search them).

I'm not really willing to ban the use of Starting and Finished though, as they could be used anywhere.

A common technique is to a less common keyword pair. I could live with "BeginExecute" and "FinishExecute" at log-level "info" at the very beginning and end of ReferenceExecute?

It would probably need to be as a pull request though...

Any other comments from others?

jeremych1000 commented 7 years ago

Feature request :)

Also, @m8pple , BeginExecute and FinishExecute will be great, I can make a pull request if I can figure out how to do so in the next few days if someone else agrees?

How are other people timing their puzzles?

m8pple commented 7 years ago

Ack, sorry - I forgot to look into this again after the initial request, as nobody brought it back to the top.

The second to last auto-run is currently half-way through, so I think I'm going to leave if for now.

Sorry about that - it was a reasonable suggestion, but at the time I didn't have bandwidth to implement and test it (well, implementation is easy, but more making sure the whole thing still works).