コード例 #1
0
ファイル: goroutines.cs プロジェクト: zjmit/go2cs
            // sub returns the stats v-s.
            public static GExecutionStat sub(this GExecutionStat s, GExecutionStat v)
            {
                GExecutionStat r = default;

                r                = s;
                r.ExecTime      -= v.ExecTime;
                r.SchedWaitTime -= v.SchedWaitTime;
                r.IOTime        -= v.IOTime;
                r.BlockTime     -= v.BlockTime;
                r.SyscallTime   -= v.SyscallTime;
                r.GCTime        -= v.GCTime;
                r.SweepTime     -= v.SweepTime;
                r.TotalTime     -= v.TotalTime;
                return(r);
            }
コード例 #2
0
ファイル: goroutines.cs プロジェクト: zjmit/go2cs
 // snapshotStat returns the snapshot of the goroutine execution statistics.
 // This is called as we process the ordered trace event stream. lastTs and
 // activeGCStartTime are used to process pending statistics if this is called
 // before any goroutine end event.
 private static GExecutionStat snapshotStat(this ptr <GDesc> _addr_g, long lastTs, long activeGCStartTime)
 {
     GExecutionStat ret = default;
     ref GDesc      g   = ref _addr_g.val;
コード例 #3
0
 public UserRegionDesc(ulong TaskID = default, @string Name = default, ref ptr <Event> Start = default, ref ptr <Event> End = default, GExecutionStat GExecutionStat = default)
 {
     this.TaskID = TaskID;
     this.Name   = Name;
     this.Start  = Start;
     this.End    = End;
     this.m_GExecutionStatRef = new ptr <GExecutionStat>(GExecutionStat);
 }