Working with Milliseconds in Coldfusion
Friday November 30, 2007 ·
3744 views ·
0 comments
Now that the development and SIT phases of my current project are coming to an end, I've been focusing on preparation for Performance and Load testing. The application that I've been working on was written in Java and runs completely behind the scenes, so using Mercury Loadrunner or some other load testing tool for metrics gathering was out of the question.The approach that I decided to take was to write a tool in CF that would parse the log files produced by the application (via log4j), aggregate the runtimes for various classes and method and then produce a graph to show average runtime for various components. The log files that I worked with had timestamps that look like this, 11/30/2007 13:01:59,123 (MM/dd/yyyy hh:mm:ss,zzz where z is milliseconds). In the course of building my metrics tool, I wrote the following UDF to aid in calculating time differences in milliseconds. ** variables.runDate is set on instantiation of the object that this udf sits in. Comments
"Be intent upon the perfection of the present day." - William Law
Recent Reads |


