Skip to content

Commit a387d36

Browse files
authored
chore(sdk): add worker metrics back (#1187)
1 parent d7bc4f3 commit a387d36

File tree

8 files changed

+167
-68
lines changed

8 files changed

+167
-68
lines changed

packages/protos/processor.proto

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ message ExecutionConfig {
4747
bool enabled = 1;
4848
optional int32 worker_count = 2;
4949
optional bool skip_when_decode_failed = 3;
50-
optional bool record_timing = 4;
5150
}
5251
}
5352

packages/protos/src/processor/protos/processor.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ export interface ExecutionConfig_DecoderWorkerConfig {
416416
enabled: boolean;
417417
workerCount?: number | undefined;
418418
skipWhenDecodeFailed?: boolean | undefined;
419-
recordTiming?: boolean | undefined;
420419
}
421420

422421
export interface ProcessConfigRequest {
@@ -1547,7 +1546,7 @@ export const ExecutionConfig = {
15471546
};
15481547

15491548
function createBaseExecutionConfig_DecoderWorkerConfig(): ExecutionConfig_DecoderWorkerConfig {
1550-
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined, recordTiming: undefined };
1549+
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined };
15511550
}
15521551

15531552
export const ExecutionConfig_DecoderWorkerConfig = {
@@ -1561,9 +1560,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
15611560
if (message.skipWhenDecodeFailed !== undefined) {
15621561
writer.uint32(24).bool(message.skipWhenDecodeFailed);
15631562
}
1564-
if (message.recordTiming !== undefined) {
1565-
writer.uint32(32).bool(message.recordTiming);
1566-
}
15671563
return writer;
15681564
},
15691565

@@ -1595,13 +1591,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
15951591

15961592
message.skipWhenDecodeFailed = reader.bool();
15971593
continue;
1598-
case 4:
1599-
if (tag !== 32) {
1600-
break;
1601-
}
1602-
1603-
message.recordTiming = reader.bool();
1604-
continue;
16051594
}
16061595
if ((tag & 7) === 4 || tag === 0) {
16071596
break;
@@ -1618,7 +1607,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16181607
skipWhenDecodeFailed: isSet(object.skipWhenDecodeFailed)
16191608
? globalThis.Boolean(object.skipWhenDecodeFailed)
16201609
: undefined,
1621-
recordTiming: isSet(object.recordTiming) ? globalThis.Boolean(object.recordTiming) : undefined,
16221610
};
16231611
},
16241612

@@ -1633,9 +1621,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16331621
if (message.skipWhenDecodeFailed !== undefined) {
16341622
obj.skipWhenDecodeFailed = message.skipWhenDecodeFailed;
16351623
}
1636-
if (message.recordTiming !== undefined) {
1637-
obj.recordTiming = message.recordTiming;
1638-
}
16391624
return obj;
16401625
},
16411626

@@ -1647,7 +1632,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16471632
message.enabled = object.enabled ?? false;
16481633
message.workerCount = object.workerCount ?? undefined;
16491634
message.skipWhenDecodeFailed = object.skipWhenDecodeFailed ?? undefined;
1650-
message.recordTiming = object.recordTiming ?? undefined;
16511635
return message;
16521636
},
16531637
};

packages/protos/src/service/common/protos/common.ts

+60-2
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ export interface Query {
667667
labelSelector: { [key: string]: string };
668668
aggregate: Aggregate | undefined;
669669
functions: Function[];
670+
color: string;
670671
disabled: boolean;
671672
}
672673

@@ -873,6 +874,7 @@ export interface SegmentationQuery {
873874
groupBy: string[];
874875
limit: number;
875876
functions: Function[];
877+
color: string;
876878
disabled: boolean;
877879
}
878880

@@ -1481,6 +1483,7 @@ export interface PriceSegmentationQuery {
14811483
id: string;
14821484
alias: string;
14831485
coinId: CoinID[];
1486+
color: string;
14841487
disabled: boolean;
14851488
}
14861489

@@ -5755,7 +5758,16 @@ export const Function = {
57555758
};
57565759

57575760
function createBaseQuery(): Query {
5758-
return { query: "", alias: "", id: "", labelSelector: {}, aggregate: undefined, functions: [], disabled: false };
5761+
return {
5762+
query: "",
5763+
alias: "",
5764+
id: "",
5765+
labelSelector: {},
5766+
aggregate: undefined,
5767+
functions: [],
5768+
color: "",
5769+
disabled: false,
5770+
};
57595771
}
57605772

57615773
export const Query = {
@@ -5778,6 +5790,9 @@ export const Query = {
57785790
for (const v of message.functions) {
57795791
Function.encode(v!, writer.uint32(58).fork()).ldelim();
57805792
}
5793+
if (message.color !== "") {
5794+
writer.uint32(74).string(message.color);
5795+
}
57815796
if (message.disabled !== false) {
57825797
writer.uint32(64).bool(message.disabled);
57835798
}
@@ -5836,6 +5851,13 @@ export const Query = {
58365851

58375852
message.functions.push(Function.decode(reader, reader.uint32()));
58385853
continue;
5854+
case 9:
5855+
if (tag !== 74) {
5856+
break;
5857+
}
5858+
5859+
message.color = reader.string();
5860+
continue;
58395861
case 8:
58405862
if (tag !== 64) {
58415863
break;
@@ -5867,6 +5889,7 @@ export const Query = {
58675889
functions: globalThis.Array.isArray(object?.functions)
58685890
? object.functions.map((e: any) => Function.fromJSON(e))
58695891
: [],
5892+
color: isSet(object.color) ? globalThis.String(object.color) : "",
58705893
disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false,
58715894
};
58725895
},
@@ -5897,6 +5920,9 @@ export const Query = {
58975920
if (message.functions?.length) {
58985921
obj.functions = message.functions.map((e) => Function.toJSON(e));
58995922
}
5923+
if (message.color !== "") {
5924+
obj.color = message.color;
5925+
}
59005926
if (message.disabled !== false) {
59015927
obj.disabled = message.disabled;
59025928
}
@@ -5924,6 +5950,7 @@ export const Query = {
59245950
? Aggregate.fromPartial(object.aggregate)
59255951
: undefined;
59265952
message.functions = object.functions?.map((e) => Function.fromPartial(e)) || [];
5953+
message.color = object.color ?? "";
59275954
message.disabled = object.disabled ?? false;
59285955
return message;
59295956
},
@@ -6510,6 +6537,7 @@ function createBaseSegmentationQuery(): SegmentationQuery {
65106537
groupBy: [],
65116538
limit: 0,
65126539
functions: [],
6540+
color: "",
65136541
disabled: false,
65146542
};
65156543
}
@@ -6540,6 +6568,9 @@ export const SegmentationQuery = {
65406568
for (const v of message.functions) {
65416569
Function.encode(v!, writer.uint32(74).fork()).ldelim();
65426570
}
6571+
if (message.color !== "") {
6572+
writer.uint32(82).string(message.color);
6573+
}
65436574
if (message.disabled !== false) {
65446575
writer.uint32(56).bool(message.disabled);
65456576
}
@@ -6609,6 +6640,13 @@ export const SegmentationQuery = {
66096640

66106641
message.functions.push(Function.decode(reader, reader.uint32()));
66116642
continue;
6643+
case 10:
6644+
if (tag !== 82) {
6645+
break;
6646+
}
6647+
6648+
message.color = reader.string();
6649+
continue;
66126650
case 7:
66136651
if (tag !== 56) {
66146652
break;
@@ -6639,6 +6677,7 @@ export const SegmentationQuery = {
66396677
functions: globalThis.Array.isArray(object?.functions)
66406678
? object.functions.map((e: any) => Function.fromJSON(e))
66416679
: [],
6680+
color: isSet(object.color) ? globalThis.String(object.color) : "",
66426681
disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false,
66436682
};
66446683
},
@@ -6669,6 +6708,9 @@ export const SegmentationQuery = {
66696708
if (message.functions?.length) {
66706709
obj.functions = message.functions.map((e) => Function.toJSON(e));
66716710
}
6711+
if (message.color !== "") {
6712+
obj.color = message.color;
6713+
}
66726714
if (message.disabled !== false) {
66736715
obj.disabled = message.disabled;
66746716
}
@@ -6694,6 +6736,7 @@ export const SegmentationQuery = {
66946736
message.groupBy = object.groupBy?.map((e) => e) || [];
66956737
message.limit = object.limit ?? 0;
66966738
message.functions = object.functions?.map((e) => Function.fromPartial(e)) || [];
6739+
message.color = object.color ?? "";
66976740
message.disabled = object.disabled ?? false;
66986741
return message;
66996742
},
@@ -9815,7 +9858,7 @@ export const CoinID_AddressIdentifier = {
98159858
};
98169859

98179860
function createBasePriceSegmentationQuery(): PriceSegmentationQuery {
9818-
return { id: "", alias: "", coinId: [], disabled: false };
9861+
return { id: "", alias: "", coinId: [], color: "", disabled: false };
98199862
}
98209863

98219864
export const PriceSegmentationQuery = {
@@ -9829,6 +9872,9 @@ export const PriceSegmentationQuery = {
98299872
for (const v of message.coinId) {
98309873
CoinID.encode(v!, writer.uint32(26).fork()).ldelim();
98319874
}
9875+
if (message.color !== "") {
9876+
writer.uint32(34).string(message.color);
9877+
}
98329878
if (message.disabled !== false) {
98339879
writer.uint32(72).bool(message.disabled);
98349880
}
@@ -9863,6 +9909,13 @@ export const PriceSegmentationQuery = {
98639909

98649910
message.coinId.push(CoinID.decode(reader, reader.uint32()));
98659911
continue;
9912+
case 4:
9913+
if (tag !== 34) {
9914+
break;
9915+
}
9916+
9917+
message.color = reader.string();
9918+
continue;
98669919
case 9:
98679920
if (tag !== 72) {
98689921
break;
@@ -9884,6 +9937,7 @@ export const PriceSegmentationQuery = {
98849937
id: isSet(object.id) ? globalThis.String(object.id) : "",
98859938
alias: isSet(object.alias) ? globalThis.String(object.alias) : "",
98869939
coinId: globalThis.Array.isArray(object?.coinId) ? object.coinId.map((e: any) => CoinID.fromJSON(e)) : [],
9940+
color: isSet(object.color) ? globalThis.String(object.color) : "",
98879941
disabled: isSet(object.disabled) ? globalThis.Boolean(object.disabled) : false,
98889942
};
98899943
},
@@ -9899,6 +9953,9 @@ export const PriceSegmentationQuery = {
98999953
if (message.coinId?.length) {
99009954
obj.coinId = message.coinId.map((e) => CoinID.toJSON(e));
99019955
}
9956+
if (message.color !== "") {
9957+
obj.color = message.color;
9958+
}
99029959
if (message.disabled !== false) {
99039960
obj.disabled = message.disabled;
99049961
}
@@ -9913,6 +9970,7 @@ export const PriceSegmentationQuery = {
99139970
message.id = object.id ?? "";
99149971
message.alias = object.alias ?? "";
99159972
message.coinId = object.coinId?.map((e) => CoinID.fromPartial(e)) || [];
9973+
message.color = object.color ?? "";
99169974
message.disabled = object.disabled ?? false;
99179975
return message;
99189976
},

packages/runtime/src/gen/processor/protos/processor.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ export interface ExecutionConfig_DecoderWorkerConfig {
416416
enabled: boolean;
417417
workerCount?: number | undefined;
418418
skipWhenDecodeFailed?: boolean | undefined;
419-
recordTiming?: boolean | undefined;
420419
}
421420

422421
export interface ProcessConfigRequest {
@@ -1596,7 +1595,7 @@ export const ExecutionConfig = {
15961595
};
15971596

15981597
function createBaseExecutionConfig_DecoderWorkerConfig(): ExecutionConfig_DecoderWorkerConfig {
1599-
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined, recordTiming: undefined };
1598+
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined };
16001599
}
16011600

16021601
export const ExecutionConfig_DecoderWorkerConfig = {
@@ -1610,9 +1609,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16101609
if (message.skipWhenDecodeFailed !== undefined) {
16111610
writer.uint32(24).bool(message.skipWhenDecodeFailed);
16121611
}
1613-
if (message.recordTiming !== undefined) {
1614-
writer.uint32(32).bool(message.recordTiming);
1615-
}
16161612
return writer;
16171613
},
16181614

@@ -1644,13 +1640,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16441640

16451641
message.skipWhenDecodeFailed = reader.bool();
16461642
continue;
1647-
case 4:
1648-
if (tag !== 32) {
1649-
break;
1650-
}
1651-
1652-
message.recordTiming = reader.bool();
1653-
continue;
16541643
}
16551644
if ((tag & 7) === 4 || tag === 0) {
16561645
break;
@@ -1667,7 +1656,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16671656
skipWhenDecodeFailed: isSet(object.skipWhenDecodeFailed)
16681657
? globalThis.Boolean(object.skipWhenDecodeFailed)
16691658
: undefined,
1670-
recordTiming: isSet(object.recordTiming) ? globalThis.Boolean(object.recordTiming) : undefined,
16711659
};
16721660
},
16731661

@@ -1682,9 +1670,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16821670
if (message.skipWhenDecodeFailed !== undefined) {
16831671
obj.skipWhenDecodeFailed = message.skipWhenDecodeFailed;
16841672
}
1685-
if (message.recordTiming !== undefined) {
1686-
obj.recordTiming = message.recordTiming;
1687-
}
16881673
return obj;
16891674
},
16901675

@@ -1696,7 +1681,6 @@ export const ExecutionConfig_DecoderWorkerConfig = {
16961681
message.enabled = object.enabled ?? false;
16971682
message.workerCount = object.workerCount ?? undefined;
16981683
message.skipWhenDecodeFailed = object.skipWhenDecodeFailed ?? undefined;
1699-
message.recordTiming = object.recordTiming ?? undefined;
17001684
return message;
17011685
},
17021686
};

0 commit comments

Comments
 (0)