Hi everybody,
I am facing a problem which is leaving me stumped.
First let me explain the easy part, which I could do and have setup.
We have a set of testcases which run through various stages, lets say stage1 stage2 stage3 stage4 and so on.
When I run my regression, all the specified testcases run through this setup, and I have a log file for the regression for each testcase run.
I search and read the runtime and memory statistics and dump a csv file and dump it like this
TestcaseName, Stage1Mem, Stage1Time, Stage2Mem, Stage2Time......
Test1,44,45,43,45.....
Test2,7,2334,45,34....
.
.
All well and good, its working fine.
Now I have to solve another problem, i.e. automatic flagging of performance degradation or spurt in performance.
so I will have an existing csv file in the same format.
I will dump new csv file and flag cases where difference in numbers exceeds (2 and 20%)
The old csv file may not have some new testcases, so the diff log so created should have the statistics of new testcases added, as well as flag which testcases changed beyond tolerance limits.
I am trying this approach.
Create a hash for each performance criteria(eg stage3) and inside a hash create a hash for each testcase. i.e. netsted hashes. That way this code is generic, I do not have to worry about new stages coming in the future!
However my hashes are a little weak, and I am getting a little stumped.
I have googled for code on nested hash within hash etc., but am still stumped, any tips will be appreciated!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.