Home > Articles

This chapter is from the book

This chapter is from the book

6.15 Postprocessing RPC Logs

The programs client4.cc and server4.cc write binary log files of 96-byte records as described earlier.

The program dumplogfile4.cc reads these log files and turns them into JSON files with the timestamps and other information turned into ASCII text. The JSON file has a stylized header that contains among other things the start minute of the log records, the title from the second command-line argument ("Write 1MB” previously), and some axis labels. This header is followed by lines of text for the log records. By default, only log records for receipt of a response are included, i.e., just those records that describe a full round-trip transaction. The -all flag includes all records.

The program makeself.cc reads a JSON file and writes an HTML file based on a template, incorporating the JSON information. This is the same makeself.cc program we encountered in Chapter 5, but with a different template file, show_rpc.html.

The displayed HTML, such as Figure 6.17, can be panned and zoomed via mouse drag and mouse wheel, respectively. The lower-left red dot resets the display. The [Rel. 0] button at the top switches between showing multiple RPCs by wall-clock- time and showing them all starting at (relative to) time zero.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.