Author Topic: How can I analyse BridgePal logs myself ?  (Read 3534 times)

johng

  • Administrator
  • *****
  • Posts: 214
    • View Profile
How can I analyse BridgePal logs myself ?
« on: December 21, 2016, 19:17:18 »
Here is a rough and ready BridgePal Log analyser which can scan a set of uploaded BridgePal logs and report response times for a particular session. For information on how to upload logs from BridgePal see the topic http://mirgo2.co.uk/bridgepal_forum/index.php?topic=5.0.

The analyser summarises the number of requests in the session, average response times, and number of requests with response times falling into the following ranges – less than one second, between one and two seconds, between 2 and 3, between 3 and 4, between 4, and 5, between 5 and 10, and greater than 10 seconds.

It also shows the summarised response time statistics for each individual BridgePal. Thus you can identify which units performed under par in a particular session. There is a “Save Results...” menu option (under the File menu at the top left of the results window), which saves the displayed output to a file of your choice.
 
The application is in the attached zip file and is written in java. You must have previously installed a java runtime on your system in order to run it (if you don’t have java installed visit java.com). The zip file contains a single directory. Extract that directory to a location on your C drive. Open the directory and double click on BridgePalLogAnalyser.jar to start the application. The application will bring up a calendar and a time ‘spinner’ requesting you to enter the start date/time of the session (you can enter a time earlier than the actual start of the session but the aim is to exclude processing of any earlier sessions). Click on the OK button when you have set the date/time. Note: The time spinner is a bit fiddly to set. You can double click on one of the components (hours, minutes, seconds) to select it and then use the adjacent up and down arrows to change it. If you double click on the up or down arrow and hold it down, the spinner will cycle through the numbers automatically until you release the mouse button.
 
The application will now ask you to enter the date/time of the end of the session (you can set it to a later date/time as long as it is earlier than any subsequent sessions). Again, click OK when this has been done.
 
Finally, the application will bring up a file dialog box so that you can navigate to the directory in which you have uploaded all the BridgePal log files. The directory can contain other files – the application just processes files with names starting with “ID-“ and having a .txt extension. In the file dialog box just do a single click on the directory name to select it and then click on the “Open” button (double clicking on the directory name will just open the directory to display the files inside).
 
The application will then process the files and display the above information.
 
Caveats:
 
- The date/times must have been set up correctly on the BridgePal units so that the log files contain accurate date and timestamps.
- The percentages shown are rounded down to the nearest integer – for example if 5 requests out of 1000 took between 1 and 2 seconds this will display as 0%
- For the same reason, the sum of all percentages shown may be less than 100
- The application will not currently accurately detect response times longer than 5 seconds. This is because an auto-retry occurs after 5 seconds. Thus a response time of 7 seconds would actually be detected as two requests – one with a five second response time and one with a 2 second response time. However, a 12 second response time would also appear to the application to be two requests (5 seconds and 7 seconds) because there is only a single auto-retry.

John
 
« Last Edit: August 12, 2017, 19:08:36 by johng »

johng

  • Administrator
  • *****
  • Posts: 214
    • View Profile
Re: How can I analyse BridgePal logs myself ?
« Reply #1 on: December 21, 2016, 19:38:34 »
The log analyser described above does not provide any information about the quality of the wifi links. Normally, the response time after tapping the OK button on a BridgePal screen should be subsecond. Frequent extended response times of many seconds could be due to the quality of the wifi connection. It may be useful to look at BridgePal logs to see if there were any problems with the wifi connectivity during the session.

The files are just text files so can be viewed with any text editor. Upload the files from the BridgePals to the scoring PC as described in the earlier post in this topic. There may be multiple log files from each device. The date and time at which each file was created is embedded in the filename. There are various events that cause a log file to be closed and another log file to be started, so there may be multiple log files for the same date, each covering a different interval of time. The log file names also contain the "device id" embedded. The device id for a particular BridgePal can be found by starting the BridgePal app on that device and then selecting "More>>" and "Show Device Info" from the menu.

When looking at the logs, ignore the messages “onCreate”, “onStart”, “onPause”, “onStop”, “onResume”, “onDestroy”. These are just for development use and indicate when the app enters a certain state (onPause and onStop will occur when the display times out and onResume when the screen is switched back on, so you may see these in between each board being played).
 
The app logs changes in wifi status, and these lines in the log generally contain a string of  “*” characters, so you can see when the device is trying to reconnect. The same status message often appears several times in a row with sub-second gaps between. I’m not sure why it is repeated – the app just logs the messages that android sends to it.
 
Requests from BridgePal to apache start with a string of the following format:
 
For example: 12/12/16 19:51:12.453,293,http://...........
 
The first part is the date and time at which the request was issued. The time includes seconds and milliseconds (i.e. 12.453 in this example). the “293” following the timestamp in this example is the response time between the user tapping on OK and the response being received from apache. The rest of the line is the request and the parameters for the request.

John
 
« Last Edit: December 21, 2016, 19:45:54 by johng »