Home | History | Annotate | Download | only in quipper
      1 // Copyright 2015 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 syntax = "proto2";
      6 
      7 package quipper;
      8 
      9 // Stores output generated by the "perf stat" command.
     10 //
     11 // See https://perf.wiki.kernel.org/index.php/Tutorial#Counting_with_perf_stat
     12 // for more details.
     13 
     14 // Next tag: 3
     15 message PerfStatProto {
     16   // All lines printed by "perf stat".
     17   repeated PerfStatLine line = 1;
     18 
     19   // The command line used to run "perf stat".
     20   optional string command_line = 2;
     21 
     22   // Represents one line of "perf stat" output.
     23   // Next tag: 4
     24   message PerfStatLine {
     25     // Time since the start of the "perf stat" command, in milliseconds.
     26     //
     27     // When running "perf stat" and printing the counters at the end, this is
     28     // the total time taken by the run.
     29     //
     30     // Alternatively, "perf stat" can print its stats at regular intervals until
     31     // the end of the run. For example, if "perf stat" runs for one second and
     32     // prints at 200-ms intervals, it will print counter values for each event
     33     // a total of five times. According to "perf stat" usage instructions, the
     34     // printing interval should be no less than 100 ms.
     35     optional uint64 time_ms = 1;
     36 
     37     // Current count value of the event being counted. May be different from the
     38     // nominal counter value reported by "perf stat", depending on the event.
     39     // For example, memory access counters are in units of 64 bytes. A counter
     40     // value of 1024 would represent 65536 bytes, and we would set this field to
     41     // 65536.
     42     optional uint64 count = 2;
     43 
     44     // Name of event whose counter is listed on this line.
     45     // This string should also appear as part of |PerfStatProto::command_line|.
     46     // "perf stat" will preserve the event name exactly as it is passed in via
     47     // the command line.
     48     optional string event_name = 3;
     49   }
     50 }
     51