OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of service; | 5 part of service; |
6 | 6 |
7 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
9 // object ring. | 9 // object ring. |
10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 }; | 842 }; |
843 return invokeRpc('streamCancel', params); | 843 return invokeRpc('streamCancel', params); |
844 } | 844 } |
845 | 845 |
846 // A map from stream id to event stream state. | 846 // A map from stream id to event stream state. |
847 Map<String,_EventStreamState> _eventStreams = {}; | 847 Map<String,_EventStreamState> _eventStreams = {}; |
848 | 848 |
849 // Well-known stream ids. | 849 // Well-known stream ids. |
850 static const kVMStream = 'VM'; | 850 static const kVMStream = 'VM'; |
851 static const kIsolateStream = 'Isolate'; | 851 static const kIsolateStream = 'Isolate'; |
| 852 static const kTimelineStream = 'Timeline'; |
852 static const kDebugStream = 'Debug'; | 853 static const kDebugStream = 'Debug'; |
853 static const kGCStream = 'GC'; | 854 static const kGCStream = 'GC'; |
854 static const kStdoutStream = 'Stdout'; | 855 static const kStdoutStream = 'Stdout'; |
855 static const kStderrStream = 'Stderr'; | 856 static const kStderrStream = 'Stderr'; |
856 static const _kGraphStream = '_Graph'; | 857 static const _kGraphStream = '_Graph'; |
857 | 858 |
858 /// Returns a single-subscription Stream object for a VM event stream. | 859 /// Returns a single-subscription Stream object for a VM event stream. |
859 Future<Stream> getEventStream(String streamId) async { | 860 Future<Stream> getEventStream(String streamId) async { |
860 var eventStream = _eventStreams.putIfAbsent( | 861 var eventStream = _eventStreams.putIfAbsent( |
861 streamId, () => new _EventStreamState( | 862 streamId, () => new _EventStreamState( |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1848 @observable bool atAsyncSuspension; | 1849 @observable bool atAsyncSuspension; |
1849 @observable ServiceObject inspectee; | 1850 @observable ServiceObject inspectee; |
1850 @observable ByteData data; | 1851 @observable ByteData data; |
1851 @observable int count; | 1852 @observable int count; |
1852 @observable String reason; | 1853 @observable String reason; |
1853 @observable String exceptions; | 1854 @observable String exceptions; |
1854 @observable String bytesAsString; | 1855 @observable String bytesAsString; |
1855 @observable Map logRecord; | 1856 @observable Map logRecord; |
1856 @observable String extensionKind; | 1857 @observable String extensionKind; |
1857 @observable Map extensionData; | 1858 @observable Map extensionData; |
| 1859 @observable List timelineEvents; |
1858 | 1860 |
1859 int chunkIndex, chunkCount, nodeCount; | 1861 int chunkIndex, chunkCount, nodeCount; |
1860 | 1862 |
1861 @observable bool get isPauseEvent { | 1863 @observable bool get isPauseEvent { |
1862 return (kind == kPauseStart || | 1864 return (kind == kPauseStart || |
1863 kind == kPauseExit || | 1865 kind == kPauseExit || |
1864 kind == kPauseBreakpoint || | 1866 kind == kPauseBreakpoint || |
1865 kind == kPauseInterrupted || | 1867 kind == kPauseInterrupted || |
1866 kind == kPauseException); | 1868 kind == kPauseException); |
1867 } | 1869 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 if (map['logRecord'] != null) { | 1927 if (map['logRecord'] != null) { |
1926 logRecord = map['logRecord']; | 1928 logRecord = map['logRecord']; |
1927 logRecord['time'] = | 1929 logRecord['time'] = |
1928 new DateTime.fromMillisecondsSinceEpoch(logRecord['time']); | 1930 new DateTime.fromMillisecondsSinceEpoch(logRecord['time']); |
1929 logRecord['level'] = _findLogLevel(logRecord['level']); | 1931 logRecord['level'] = _findLogLevel(logRecord['level']); |
1930 } | 1932 } |
1931 if (map['extensionKind'] != null) { | 1933 if (map['extensionKind'] != null) { |
1932 extensionKind = map['extensionKind']; | 1934 extensionKind = map['extensionKind']; |
1933 extensionData = map['extensionData']; | 1935 extensionData = map['extensionData']; |
1934 } | 1936 } |
| 1937 if (map['timelineEvents'] != null) { |
| 1938 timelineEvents = map['timelineEvents']; |
| 1939 } |
1935 } | 1940 } |
1936 | 1941 |
1937 String toString() { | 1942 String toString() { |
1938 var ownerName = owner.id != null ? owner.id.toString() : owner.name; | 1943 var ownerName = owner.id != null ? owner.id.toString() : owner.name; |
1939 if (data == null) { | 1944 if (data == null) { |
1940 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " | 1945 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " |
1941 "time=${timestamp})"; | 1946 "time=${timestamp})"; |
1942 } else { | 1947 } else { |
1943 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " | 1948 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " |
1944 "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})"; | 1949 "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})"; |
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4011 var v = list[i]; | 4016 var v = list[i]; |
4012 if ((v is ObservableMap) && _isServiceMap(v)) { | 4017 if ((v is ObservableMap) && _isServiceMap(v)) { |
4013 list[i] = owner.getFromMap(v); | 4018 list[i] = owner.getFromMap(v); |
4014 } else if (v is ObservableList) { | 4019 } else if (v is ObservableList) { |
4015 _upgradeObservableList(v, owner); | 4020 _upgradeObservableList(v, owner); |
4016 } else if (v is ObservableMap) { | 4021 } else if (v is ObservableMap) { |
4017 _upgradeObservableMap(v, owner); | 4022 _upgradeObservableMap(v, owner); |
4018 } | 4023 } |
4019 } | 4024 } |
4020 } | 4025 } |
OLD | NEW |