namespace java com.jetbrains.python.profiler

struct FuncStat {
  1: required string file,       // File name of the executed function
  2: optional i32 line,    	  // Line number of the executed function
  3: required string func_name,	  // Name of the executed function
  4: required i32 calls_count,	  // number of times the executed function is called.
  5: required double total_time,	  // total time spent in the executed function. See Clock Types to interpret this value correctly.
  6: required double own_time,     // total time spent in the executed function, excluding subcalls. See Clock Types to interpret this value correctly.
}

struct Function {
   1: required FuncStat func_stat,
   2: optional list<FuncStat> callers,    // list of functions called from the executed function.
}


struct Stats {
  1: required list<Function> func_stats
}

struct CallTreeStat {
  1: required i32 count,
  2: required string name,
  3: required list<CallTreeStat> children,
}

struct TreeStats {
  1: required double sampling_interval,
  2: optional CallTreeStat call_tree,
}


struct Stats_Req {}

struct SaveSnapshot_Req {
  1: required string filepath
}


struct ProfilerRequest {
  1: required i32 id,
  2: optional Stats_Req ystats,
  3: optional SaveSnapshot_Req save_snapshot,
}

struct ProfilerResponse {
  1: required i32 id,
  2: optional Stats ystats,
  3: optional TreeStats tree_stats,
  4: optional string snapshot_filepath,
}
namespace java com.jetbrains.python.profiler

struct FuncStat {
  1: required string file,       // File name of the executed function
  2: optional i32 line,    	  // Line number of the executed function
  3: required string func_name,	  // Name of the executed function
  4: required i32 calls_count,	  // number of times the executed function is called.
  5: required double total_time,	  // total time spent in the executed function. See Clock Types to interpret this value correctly.
  6: required double own_time,     // total time spent in the executed function, excluding subcalls. See Clock Types to interpret this value correctly.
}

struct Function {
   1: required FuncStat func_stat,
   2: required list<FuncStat> callers,    // list of functions called from the executed function.
}


struct Stats {
  1: required list<Function> func_stats
}

struct CallTreeStat {
  1: required i32 count,
  2: required string name,
  3: required list<CallTreeStat> children,
}

struct TreeStats {
  1: required double sampling_interval,
  2: optional CallTreeStat call_tree,
}


struct Stats_Req {}

struct SaveSnapshot_Req {
  1: required string filepath
}


struct ProfilerRequest {
  1: required i32 id,
  2: optional Stats_Req ystats,
  3: optional SaveSnapshot_Req save_snapshot,
}

struct ProfilerResponse {
  1: required i32 id,
  2: optional Stats ystats,
  3: optional TreeStats tree_stats,
  4: optional string snapshot_filepath,
}
Fix building profile call graph (PY-19862)

michaelgallacher/intellij-community,FHannes/intellij-community,signed/intellij-community,michaelgallacher/intellij-community,ThiagoGarciaAlves/intellij-community,ibinti/intellij-community,FHannes/intellij-community,fitermay/intellij-community,idea4bsd/idea4bsd,asedunov/intellij-community,allotria/intellij-community,apixandru/intellij-community,apixandru/intellij-community,semonte/intellij-community,asedunov/intellij-community,idea4bsd/idea4bsd,ibinti/intellij-community,mglukhikh/intellij-community,ThiagoGarciaAlves/intellij-community,suncycheng/intellij-community,signed/intellij-community,ibinti/intellij-community,xfournet/intellij-community,vvv1559/intellij-community,ThiagoGarciaAlves/intellij-community,apixandru/intellij-community,FHannes/intellij-community,vvv1559/intellij-community,allotria/intellij-community,idea4bsd/idea4bsd,fitermay/intellij-community,youdonghai/intellij-community,suncycheng/intellij-community,da1z/intellij-community,FHannes/intellij-community,mglukhikh/intellij-community,hurricup/intellij-community,idea4bsd/idea4bsd,semonte/intellij-community,fitermay/intellij-community,asedunov/intellij-community,vvv1559/intellij-community,fitermay/intellij-community,xfournet/intellij-community,suncycheng/intellij-community,xfournet/intellij-community,vvv1559/intellij-community,signed/intellij-community,ibinti/intellij-community,signed/intellij-community,da1z/intellij-community,FHannes/intellij-community,vvv1559/intellij-community,signed/intellij-community,xfournet/intellij-community,da1z/intellij-community,michaelgallacher/intellij-community,FHannes/intellij-community,vvv1559/intellij-community,suncycheng/intellij-community,michaelgallacher/intellij-community,hurricup/intellij-community,signed/intellij-community,asedunov/intellij-community,xfournet/intellij-community,fitermay/intellij-community,ThiagoGarciaAlves/intellij-community,mglukhikh/intellij-community,FHannes/intellij-community,suncycheng/intellij-community,xfournet/intellij-community,asedunov/intellij-community,fitermay/intellij-community,asedunov/intellij-community,ibinti/intellij-community,michaelgallacher/intellij-community,FHannes/intellij-community,hurricup/intellij-community,mglukhikh/intellij-community,semonte/intellij-community,vvv1559/intellij-community,michaelgallacher/intellij-community,suncycheng/intellij-community,fitermay/intellij-community,hurricup/intellij-community,idea4bsd/idea4bsd,michaelgallacher/intellij-community,ThiagoGarciaAlves/intellij-community,apixandru/intellij-community,fitermay/intellij-community,ThiagoGarciaAlves/intellij-community,allotria/intellij-community,mglukhikh/intellij-community,michaelgallacher/intellij-community,apixandru/intellij-community,fitermay/intellij-community,suncycheng/intellij-community,apixandru/intellij-community,semonte/intellij-community,hurricup/intellij-community,FHannes/intellij-community,hurricup/intellij-community,semonte/intellij-community,allotria/intellij-community,allotria/intellij-community,semonte/intellij-community,ThiagoGarciaAlves/intellij-community,xfournet/intellij-community,ThiagoGarciaAlves/intellij-community,semonte/intellij-community,idea4bsd/idea4bsd,allotria/intellij-community,suncycheng/intellij-community,xfournet/intellij-community,mglukhikh/intellij-community,idea4bsd/idea4bsd,mglukhikh/intellij-community,hurricup/intellij-community,idea4bsd/idea4bsd,apixandru/intellij-community,mglukhikh/intellij-community,hurricup/intellij-community,allotria/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,apixandru/intellij-community,hurricup/intellij-community,vvv1559/intellij-community,youdonghai/intellij-community,mglukhikh/intellij-community,FHannes/intellij-community,signed/intellij-community,signed/intellij-community,suncycheng/intellij-community,da1z/intellij-community,asedunov/intellij-community,signed/intellij-community,ThiagoGarciaAlves/intellij-community,idea4bsd/idea4bsd,apixandru/intellij-community,da1z/intellij-community,vvv1559/intellij-community,hurricup/intellij-community,ibinti/intellij-community,semonte/intellij-community,semonte/intellij-community,asedunov/intellij-community,allotria/intellij-community,mglukhikh/intellij-community,FHannes/intellij-community,da1z/intellij-community,signed/intellij-community,suncycheng/intellij-community,asedunov/intellij-community,ThiagoGarciaAlves/intellij-community,suncycheng/intellij-community,ibinti/intellij-community,ibinti/intellij-community,semonte/intellij-community,xfournet/intellij-community,FHannes/intellij-community,FHannes/intellij-community,hurricup/intellij-community,vvv1559/intellij-community,youdonghai/intellij-community,apixandru/intellij-community,fitermay/intellij-community,youdonghai/intellij-community,ibinti/intellij-community,allotria/intellij-community,apixandru/intellij-community,apixandru/intellij-community,youdonghai/intellij-community,da1z/intellij-community,fitermay/intellij-community,asedunov/intellij-community,mglukhikh/intellij-community,youdonghai/intellij-community,ibinti/intellij-community,da1z/intellij-community,signed/intellij-community,xfournet/intellij-community,youdonghai/intellij-community,ibinti/intellij-community,da1z/intellij-community,asedunov/intellij-community,suncycheng/intellij-community,semonte/intellij-community,youdonghai/intellij-community,ibinti/intellij-community,michaelgallacher/intellij-community,asedunov/intellij-community,fitermay/intellij-community,semonte/intellij-community,xfournet/intellij-community,idea4bsd/idea4bsd,michaelgallacher/intellij-community,allotria/intellij-community,signed/intellij-community,ibinti/intellij-community,youdonghai/intellij-community,michaelgallacher/intellij-community,hurricup/intellij-community,fitermay/intellij-community,idea4bsd/idea4bsd,youdonghai/intellij-community,xfournet/intellij-community,mglukhikh/intellij-community,da1z/intellij-community,apixandru/intellij-community,youdonghai/intellij-community,vvv1559/intellij-community,youdonghai/intellij-community,allotria/intellij-community,ThiagoGarciaAlves/intellij-community,signed/intellij-community,da1z/intellij-community,allotria/intellij-community,hurricup/intellij-community,da1z/intellij-community,xfournet/intellij-community,vvv1559/intellij-community,idea4bsd/idea4bsd,vvv1559/intellij-community,da1z/intellij-community,semonte/intellij-community,michaelgallacher/intellij-community,youdonghai/intellij-community,asedunov/intellij-community,ThiagoGarciaAlves/intellij-community,idea4bsd/idea4bsd,apixandru/intellij-community