public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "source_arg_set_id":
                    SourceArgSetId = (uint)longVal;
                    break;

                case "gpu_id":
                    GpuId = (uint)longVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;

                case "unit":
                    Unit = strVal;
                    break;

                case "description":
                    Description = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #2
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "utid":
                    Utid = (uint)longVal;
                    break;

                case "ts":
                    Timestamp = longVal;
                    break;

                case "cpu":
                    Cpu = (uint)longVal;
                    break;

                case "arg_set_id":
                    ArgSetId = (uint)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "depth":
                    Depth = (uint)longVal;
                    break;

                case "parent_id":
                    ParentId = (int)longVal;
                    break;

                case "frame_id":
                    FrameId = (int)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "type":
                    Type = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "ts":
                    Timestamp = longVal;
                    break;

                case "clock_id":
                    ClockId = longVal;
                    break;

                case "clock_value":
                    ClockValue = longVal;
                    break;

                case "snapshot_id":
                    SnapshotId = longVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = stringCells[counters.StringCounter++];
                switch (col)
                {
                case "clock_name":
                    ClockName = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #5
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "int_value":
                    IntValue = longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = stringCells[counters.StringCounter++];
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;

                case "key_type":
                    KeyType = strVal;
                    break;

                case "str_value":
                    StrValue = strVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception($"Unexpected CellType {col} {cellType}");
            }
        }
Пример #6
0
        public override void ProcessCell(string colName,
            QueryResult.Types.CellsBatch.Types.CellType cellType,
            QueryResult.Types.CellsBatch batch,
            string[] stringCells,
            CellCounters counters)
        {
            var col = colName.ToLower();
            switch (cellType)
            {
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                    break;
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                    var longVal = batch.VarintCells[counters.IntCounter++];
                    switch (col)
                    {
                        case "id":
                            Id = (int)longVal;
                            break;
                        case "uid":
                            Uid = (uint) longVal;
                            break;
                        case "debuggable":
                            Debuggable = Convert.ToBoolean(longVal);
                            break;
                        case "profileable_from_shell":
                            ProfileableFromShell = Convert.ToBoolean(longVal);
                            break;
                        case "version_code":
                            VersionCode = longVal;
                            break;
                    }

                    break;
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                    break;
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                    var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                    switch (col)
                    {
                        case "type":
                            Type = strVal;
                            break;
                        case "package_name":
                            PackageName = strVal;
                            break;
                    }
                    break;
                case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                    break;
                default:
                    throw new Exception("Unexpected CellType");
            }
        }
Пример #7
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "start_ts":
                    StartTimestamp = longVal;
                    break;

                case "end_ts":
                    EndTimestamp = longVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #8
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "start":
                    Start = longVal;
                    break;

                case "end":
                    End = longVal;
                    break;

                case "exact_offset":
                    ExactOffset = longVal;
                    break;

                case "start_offset":
                    StartOffset = longVal;
                    break;

                case "load_bias":
                    LoadBias = longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;

                case "type":
                    Type = strVal;
                    break;

                case "build_id":
                    BuildId = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "upid":
                    Upid = (uint)longVal;
                    break;

                case "id":
                    Id = longVal;
                    break;

                case "pid":
                    Pid = (uint)longVal;
                    break;

                case "uid":
                    Uid = (uint)longVal;
                    break;

                case "parent_upid":
                    ParentUpid = (uint)longVal;
                    break;

                case "android_appid":
                    AndroidAppId = (uint)longVal;
                    break;

                case "arg_set_id":
                    ArgSetId = (uint)longVal;
                    break;

                case "start_ts":
                    StartTimestamp = longVal;
                    break;

                case "end_ts":
                    EndTimestamp = longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = stringCells[counters.StringCounter++];
                switch (col)
                {
                case "type":
                    Type = strVal;
                    break;

                case "cmdline":
                    CmdLine = strVal;
                    break;

                case "name":
                    Name = strVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #10
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "mapping":
                    Mapping = (int)longVal;
                    break;

                case "rel_pc":
                    RelPc = longVal;
                    break;

                case "symbol_set_id":
                    SymbolSetId = (uint)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;

                case "type":
                    Type = strVal;
                    break;

                case "deobfuscated_name":
                    DeobfuscatedName = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #11
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "ts":
                    Timestamp = longVal;
                    break;

                case "dur":
                    Duration = longVal;
                    break;

                case "arg_set_id":
                    ArgSetId = (uint)longVal;
                    break;

                case "track_id":
                    TrackId = (int)longVal;
                    break;

                case "parent_id":
                    ParentId = (int)longVal;
                    break;

                case "display_frame_token":
                    DisplayFrameToken = longVal;
                    break;

                case "surface_frame_token":
                    SurfaceFrameToken = longVal;
                    break;

                case "upid":
                    Upid = (uint)longVal;
                    break;

                case "on_time_finish":
                    OnTimeFinish = (int)longVal;
                    break;

                case "gpu_composition":
                    GpuComposition = (int)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "name":
                    Name = strVal;
                    break;

                case "type":
                    Type = strVal;
                    break;

                case "category":
                    Category = strVal;
                    break;

                case "layer_name":
                    LayerName = strVal;
                    break;

                case "jank_type":
                    JankType = Common.StringIntern(strVal);
                    break;

                case "jank_tag":
                    JankTag = Common.StringIntern(strVal);
                    break;

                case "prediction_type":
                    PredictionType = Common.StringIntern(strVal);
                    break;

                case "present_type":
                    PresentType = Common.StringIntern(strVal);
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
        public override void ProcessCell(string colName, QueryResult.Types.CellsBatch.Types.CellType cellType, QueryResult.Types.CellsBatch batch, string[] stringCells, CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "utid":
                    Utid = (uint)longVal;
                    break;

                case "ts":
                    Timestamp = longVal;
                    break;

                case "dur":
                    Duration = longVal;
                    break;

                case "cpu":
                    Cpu = (uint)longVal;
                    break;

                case "priority":
                    Priority = (int)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                var floatVal = batch.Float64Cells[counters.FloatCounter++];
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = stringCells[counters.StringCounter++];
                switch (col)
                {
                case "end_state":
                    SetEndState(strVal);
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "utid":
                    Utid = (uint)longVal;
                    break;

                case "ts":
                    Timestamp = longVal;
                    break;

                case "prio":
                    Priority = (int)longVal;
                    if (Priority >= 0 && Priority < PriorityToString.Length)
                    {
                        PriorityString = PriorityToString[longVal];
                    }
                    else
                    {
                        PriorityString = Common.StringIntern(longVal.ToString());
                    }
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "tag":
                    Tag = strVal;
                    break;

                case "msg":
                    Message = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #14
0
 /// <summary>
 /// This method is responsible for processing an individual cell in a SQL query, which is stored in the QueryResult
 /// protobuf object (QueryResult.Batch.Cells)
 ///
 /// CellType defines what type this cell is (int, string, float, ...) and the batch object contains
 /// separate data arrays for each of those types (varintcells[], varfloatcells[]). The counters object
 /// maintains the indices into each of these data arrays.
 ///
 /// String cells need to be preprocessed by us because they come as a single string delimited by null characater.
 ///
 /// For more information, see comments for QueryResult and CellsBatch inside TraceProcessor.cs
 ///
 /// </summary>
 /// <param name="colName">String name of the column</param>
 /// <param name="cellType">Type of cell</param>
 /// <param name="batch">Batch object that contains the data arrays</param>
 /// <param name="stringCells">All the string cells already split into an array</param>
 /// <param name="counters">Indexes into the data arrays</param>
 public abstract void ProcessCell(string colName,
                                  QueryResult.Types.CellsBatch.Types.CellType cellType,
                                  QueryResult.Types.CellsBatch batch,
                                  string[] stringCells,
                                  CellCounters counters);
Пример #15
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "id":
                    Id = (int)longVal;
                    break;

                case "ts":
                    Timestamp = longVal;
                    break;

                case "utid":
                    Utid = (uint)longVal;
                    break;

                case "cpu":
                    Cpu = (uint)longVal;
                    break;

                case "callsite_id":
                    CallsiteId = (int)longVal;
                    break;

                case "perf_session_id":
                    PerfSessionId = (uint)longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "type":
                    Type = strVal;
                    break;

                case "cpu_mode":
                    CpuMode = strVal;
                    break;

                case "unwind_error":
                    UnwindError = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }
Пример #16
0
        public override void ProcessCell(string colName,
                                         QueryResult.Types.CellsBatch.Types.CellType cellType,
                                         QueryResult.Types.CellsBatch batch,
                                         string[] stringCells,
                                         CellCounters counters)
        {
            var col = colName.ToLower();

            switch (cellType)
            {
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellInvalid:
            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellNull:
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellVarint:
                var longVal = batch.VarintCells[counters.IntCounter++];
                switch (col)
                {
                case "arg_set_id":
                    ArgSetId = (uint)longVal;
                    break;

                case "int_value":
                    IntValue = longVal;
                    break;
                }

                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellFloat64:
                var floatVal = batch.Float64Cells[counters.FloatCounter++];
                if (col == "real_value")
                {
                    RealValue = floatVal;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellString:
                var strVal = Common.StringIntern(stringCells[counters.StringCounter++]);
                switch (col)
                {
                case "flat_key":
                    Flatkey = strVal;
                    break;

                case "key":
                    ArgKey = strVal;
                    break;

                case "string_value":
                    StringValue = strVal;
                    break;

                case "value_type":
                    ValueType = strVal;
                    break;
                }
                break;

            case Perfetto.Protos.QueryResult.Types.CellsBatch.Types.CellType.CellBlob:
                break;

            default:
                throw new Exception("Unexpected CellType");
            }
        }