wu-sheng commented on a change in pull request #8696: URL: https://github.com/apache/skywalking/pull/8696#discussion_r829174312
########## File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/ebpf/analyze/EBPFProfilingAnalyzer.java ########## @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.profiling.ebpf.analyze; + +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingDataRecord; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzation; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzeTimeRange; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingTree; +import org.apache.skywalking.oap.server.core.storage.StorageModule; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.IEBPFProfilingDataDAO; +import org.apache.skywalking.oap.server.library.module.ModuleManager; +import org.apache.skywalking.oap.server.library.util.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +public class EBPFProfilingAnalyzer { + + private static final Logger LOGGER = LoggerFactory.getLogger(EBPFProfilingAnalyzer.class); + + private static final EBPFProfilingAnalyzeCollector ANALYZE_COLLECTOR = new EBPFProfilingAnalyzeCollector(); + private static final Long FETCH_FETCH_DURATION = TimeUnit.MINUTES.toMillis(2); + + private final ModuleManager moduleManager; + protected IEBPFProfilingDataDAO dataDAO; + + public EBPFProfilingAnalyzer(ModuleManager moduleManager) { + this.moduleManager = moduleManager; + } + + /** + * search data and analyze + */ + public EBPFProfilingAnalyzation analyze(String taskId, List<EBPFProfilingAnalyzeTimeRange> ranges) throws IOException { + EBPFProfilingAnalyzation analyzation = new EBPFProfilingAnalyzation(); + + List<TimeRange> timeRanges = buildTimeRanges(ranges); + if (CollectionUtils.isEmpty(timeRanges)) { + analyzation.setTip("data not found"); + return analyzation; + } + + // query data + List<EBPFProfilingStack> stacks = timeRanges.parallelStream().map(r -> { + try { + return getDataDAO().queryData(taskId, r.minTime, r.maxTime); + } catch (IOException e) { + LOGGER.warn(e.getMessage(), e); + return Collections.<EBPFProfilingDataRecord>emptyList(); + } + }).flatMap(Collection::stream).map(e -> { + try { + return EBPFProfilingStack.deserialize(e); + } catch (Exception ex) { + LOGGER.warn("could not deserialize the stack", ex); + return null; + } + }).filter(Objects::nonNull).distinct().collect(Collectors.toList()); + + // analyze + final List<EBPFProfilingTree> trees = analyze(stacks); + if (trees != null) { + analyzation.getTrees().addAll(trees); + } + + return analyzation; + } + + protected List<TimeRange> buildTimeRanges(List<EBPFProfilingAnalyzeTimeRange> timeRanges) { + return timeRanges.parallelStream() + .map(r -> buildTimeRanges(r.getStart(), r.getEnd())) + .filter(Objects::nonNull) + .flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + protected List<TimeRange> buildTimeRanges(long start, long end) { + if (start >= end) { + return null; + } + + // include latest millisecond + end += 1; + + final List<TimeRange> timeRanges = new ArrayList<>(); + do { + long batchEnd = Math.min(start + FETCH_FETCH_DURATION, end); + timeRanges.add(new TimeRange(start, batchEnd)); + start = batchEnd; + } + while (start < end); + + return timeRanges; + } + + /** + * Analyze records + */ + protected List<EBPFProfilingTree> analyze(List<EBPFProfilingStack> stacks) { + if (CollectionUtils.isEmpty(stacks)) { + return null; + } + + // using parallel stream + Map<EBPFProfilingStack.Symbol, EBPFProfilingTree> stackTrees = stacks.parallelStream() + // stack list cannot be empty + .filter(s -> CollectionUtils.isNotEmpty(s.getSymbols())) + .collect(Collectors.groupingBy(s -> s.getSymbols() + .get(0), ANALYZE_COLLECTOR)); + + return new ArrayList<>(stackTrees.values()); + } + + protected IEBPFProfilingDataDAO getDataDAO() { + if (dataDAO == null) { + dataDAO = moduleManager.find(StorageModule.NAME) + .provider() + .getService(IEBPFProfilingDataDAO.class); + } + return dataDAO; + } + + private static class TimeRange { Review comment: What does TimeRange mean? ########## File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/ebpf/analyze/EBPFProfilingAnalyzer.java ########## @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.profiling.ebpf.analyze; + +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingDataRecord; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzation; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzeTimeRange; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingTree; +import org.apache.skywalking.oap.server.core.storage.StorageModule; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.IEBPFProfilingDataDAO; +import org.apache.skywalking.oap.server.library.module.ModuleManager; +import org.apache.skywalking.oap.server.library.util.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +public class EBPFProfilingAnalyzer { + + private static final Logger LOGGER = LoggerFactory.getLogger(EBPFProfilingAnalyzer.class); + + private static final EBPFProfilingAnalyzeCollector ANALYZE_COLLECTOR = new EBPFProfilingAnalyzeCollector(); + private static final Long FETCH_FETCH_DURATION = TimeUnit.MINUTES.toMillis(2); + + private final ModuleManager moduleManager; + protected IEBPFProfilingDataDAO dataDAO; + + public EBPFProfilingAnalyzer(ModuleManager moduleManager) { + this.moduleManager = moduleManager; + } + + /** + * search data and analyze + */ + public EBPFProfilingAnalyzation analyze(String taskId, List<EBPFProfilingAnalyzeTimeRange> ranges) throws IOException { + EBPFProfilingAnalyzation analyzation = new EBPFProfilingAnalyzation(); + + List<TimeRange> timeRanges = buildTimeRanges(ranges); + if (CollectionUtils.isEmpty(timeRanges)) { + analyzation.setTip("data not found"); + return analyzation; + } + + // query data + List<EBPFProfilingStack> stacks = timeRanges.parallelStream().map(r -> { + try { + return getDataDAO().queryData(taskId, r.minTime, r.maxTime); + } catch (IOException e) { + LOGGER.warn(e.getMessage(), e); + return Collections.<EBPFProfilingDataRecord>emptyList(); + } + }).flatMap(Collection::stream).map(e -> { + try { + return EBPFProfilingStack.deserialize(e); + } catch (Exception ex) { + LOGGER.warn("could not deserialize the stack", ex); + return null; + } + }).filter(Objects::nonNull).distinct().collect(Collectors.toList()); + + // analyze + final List<EBPFProfilingTree> trees = analyze(stacks); + if (trees != null) { + analyzation.getTrees().addAll(trees); + } + + return analyzation; + } + + protected List<TimeRange> buildTimeRanges(List<EBPFProfilingAnalyzeTimeRange> timeRanges) { + return timeRanges.parallelStream() + .map(r -> buildTimeRanges(r.getStart(), r.getEnd())) + .filter(Objects::nonNull) + .flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + protected List<TimeRange> buildTimeRanges(long start, long end) { + if (start >= end) { + return null; + } + + // include latest millisecond + end += 1; + + final List<TimeRange> timeRanges = new ArrayList<>(); + do { + long batchEnd = Math.min(start + FETCH_FETCH_DURATION, end); + timeRanges.add(new TimeRange(start, batchEnd)); + start = batchEnd; + } + while (start < end); + + return timeRanges; + } + + /** + * Analyze records + */ + protected List<EBPFProfilingTree> analyze(List<EBPFProfilingStack> stacks) { Review comment: This method should have very strong UTs to cover merging logic. This is the key of the whole visualization result. ########## File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/ebpf/analyze/EBPFProfilingAnalyzer.java ########## @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.profiling.ebpf.analyze; + +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingDataRecord; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzation; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingAnalyzeTimeRange; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingTree; +import org.apache.skywalking.oap.server.core.storage.StorageModule; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.IEBPFProfilingDataDAO; +import org.apache.skywalking.oap.server.library.module.ModuleManager; +import org.apache.skywalking.oap.server.library.util.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +public class EBPFProfilingAnalyzer { + + private static final Logger LOGGER = LoggerFactory.getLogger(EBPFProfilingAnalyzer.class); + + private static final EBPFProfilingAnalyzeCollector ANALYZE_COLLECTOR = new EBPFProfilingAnalyzeCollector(); + private static final Long FETCH_FETCH_DURATION = TimeUnit.MINUTES.toMillis(2); + + private final ModuleManager moduleManager; + protected IEBPFProfilingDataDAO dataDAO; + + public EBPFProfilingAnalyzer(ModuleManager moduleManager) { + this.moduleManager = moduleManager; + } + + /** + * search data and analyze + */ + public EBPFProfilingAnalyzation analyze(String taskId, List<EBPFProfilingAnalyzeTimeRange> ranges) throws IOException { + EBPFProfilingAnalyzation analyzation = new EBPFProfilingAnalyzation(); + + List<TimeRange> timeRanges = buildTimeRanges(ranges); + if (CollectionUtils.isEmpty(timeRanges)) { + analyzation.setTip("data not found"); + return analyzation; + } + + // query data + List<EBPFProfilingStack> stacks = timeRanges.parallelStream().map(r -> { + try { + return getDataDAO().queryData(taskId, r.minTime, r.maxTime); + } catch (IOException e) { + LOGGER.warn(e.getMessage(), e); + return Collections.<EBPFProfilingDataRecord>emptyList(); + } + }).flatMap(Collection::stream).map(e -> { + try { + return EBPFProfilingStack.deserialize(e); + } catch (Exception ex) { + LOGGER.warn("could not deserialize the stack", ex); + return null; + } + }).filter(Objects::nonNull).distinct().collect(Collectors.toList()); + + // analyze + final List<EBPFProfilingTree> trees = analyze(stacks); + if (trees != null) { + analyzation.getTrees().addAll(trees); + } + + return analyzation; + } + + protected List<TimeRange> buildTimeRanges(List<EBPFProfilingAnalyzeTimeRange> timeRanges) { + return timeRanges.parallelStream() + .map(r -> buildTimeRanges(r.getStart(), r.getEnd())) + .filter(Objects::nonNull) + .flatMap(Collection::stream) + .collect(Collectors.toList()); + } + + protected List<TimeRange> buildTimeRanges(long start, long end) { + if (start >= end) { + return null; + } + + // include latest millisecond + end += 1; + + final List<TimeRange> timeRanges = new ArrayList<>(); + do { + long batchEnd = Math.min(start + FETCH_FETCH_DURATION, end); + timeRanges.add(new TimeRange(start, batchEnd)); + start = batchEnd; + } + while (start < end); + + return timeRanges; + } + + /** + * Analyze records + */ + protected List<EBPFProfilingTree> analyze(List<EBPFProfilingStack> stacks) { Review comment: Also, we need some benchmarks for this merging, as you provide a list of durations, so we could face a larger merging. At the same time, we need a `circuit break` to avoid timeout. We should have the capability to provide a half-finished profiling tree with a message of `circuit break`. ########## File path: oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/EBPFProfilingTaskEsDAO.java ########## @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.storage.plugin.elasticsearch.query; + +import org.apache.skywalking.library.elasticsearch.requests.search.BoolQueryBuilder; +import org.apache.skywalking.library.elasticsearch.requests.search.Query; +import org.apache.skywalking.library.elasticsearch.requests.search.Search; +import org.apache.skywalking.library.elasticsearch.requests.search.SearchBuilder; +import org.apache.skywalking.library.elasticsearch.requests.search.Sort; +import org.apache.skywalking.library.elasticsearch.response.search.SearchHit; +import org.apache.skywalking.library.elasticsearch.response.search.SearchResponse; +import org.apache.skywalking.oap.server.core.analysis.IDManager; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTargetType; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTaskRecord; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTriggerType; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingProcessFinderType; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingTask; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.EBPFProfilingProcessFinder; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.IEBPFProfilingTaskDAO; +import org.apache.skywalking.oap.server.library.client.elasticsearch.ElasticSearchClient; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchConfig; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.EsDAO; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.IndexController; + +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; + +public class EBPFProfilingTaskEsDAO extends EsDAO implements IEBPFProfilingTaskDAO { + private final int taskMaxSize; + + public EBPFProfilingTaskEsDAO(ElasticSearchClient client, StorageModuleElasticsearchConfig config) { + super(client); + this.taskMaxSize = config.getProfileTaskQueryMaxSize(); + } + + @Override + public List<EBPFProfilingTask> queryTasks(EBPFProfilingProcessFinder finder, EBPFProfilingTargetType targetType, long taskStartTime, long latestUpdateTime) throws IOException { + final String index = + IndexController.LogicIndicesRegister.getPhysicalTableName(EBPFProfilingTaskRecord.INDEX_NAME); + final BoolQueryBuilder query = Query.bool(); + + if (finder != null && finder.getFinderType() != null) { + query.must(Query.term(EBPFProfilingTaskRecord.PROCESS_FIND_TYPE, finder.getFinderType().value())); + } + if (finder != null && finder.getServiceId() != null) { + query.must(Query.term(EBPFProfilingTaskRecord.SERVICE_ID, finder.getServiceId())); + } + if (finder != null && finder.getInstanceId() != null) { + query.must(Query.term(EBPFProfilingTaskRecord.INSTANCE_ID, finder.getInstanceId())); + } + if (finder != null && finder.getProcessIdList() != null) { + query.must(Query.terms(EBPFProfilingTaskRecord.PROCESS_ID, finder.getProcessIdList())); + } + if (targetType != null) { + query.must(Query.term(EBPFProfilingTaskRecord.TARGET_TYPE, targetType.value())); + } + if (taskStartTime > 0) { + query.must(Query.range(EBPFProfilingTaskRecord.START_TIME).gte(taskStartTime)); + } + if (latestUpdateTime > 0) { + query.must(Query.range(EBPFProfilingTaskRecord.LAST_UPDATE_TIME).gt(latestUpdateTime)); + } + + final SearchBuilder search = Search.builder().query(query) + .sort(EBPFProfilingTaskRecord.CREATE_TIME, Sort.Order.DESC) + .size(taskMaxSize); + + final SearchResponse response = getClient().search(index, search.build()); Review comment: As ebpf profiling could be much longer, `long taskStartTime, long latestUpdateTime` could mean over 5k+ profiling reports, you need to use `scroll` query. Take `MetadataQueryEsDAO#listServices` as a reference. ########## File path: oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/EBPFProfilingTaskEsDAO.java ########## @@ -0,0 +1,110 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.storage.plugin.elasticsearch.query; + +import org.apache.skywalking.library.elasticsearch.requests.search.BoolQueryBuilder; +import org.apache.skywalking.library.elasticsearch.requests.search.Query; +import org.apache.skywalking.library.elasticsearch.requests.search.Search; +import org.apache.skywalking.library.elasticsearch.requests.search.SearchBuilder; +import org.apache.skywalking.library.elasticsearch.requests.search.Sort; +import org.apache.skywalking.library.elasticsearch.response.search.SearchHit; +import org.apache.skywalking.library.elasticsearch.response.search.SearchResponse; +import org.apache.skywalking.oap.server.core.analysis.IDManager; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTargetType; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTaskRecord; +import org.apache.skywalking.oap.server.core.profiling.ebpf.storage.EBPFProfilingTriggerType; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingProcessFinderType; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingTask; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.EBPFProfilingProcessFinder; +import org.apache.skywalking.oap.server.core.storage.profiling.ebpf.IEBPFProfilingTaskDAO; +import org.apache.skywalking.oap.server.library.client.elasticsearch.ElasticSearchClient; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchConfig; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.EsDAO; +import org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.IndexController; + +import java.io.IOException; +import java.util.List; +import java.util.stream.Collectors; + +public class EBPFProfilingTaskEsDAO extends EsDAO implements IEBPFProfilingTaskDAO { + private final int taskMaxSize; + + public EBPFProfilingTaskEsDAO(ElasticSearchClient client, StorageModuleElasticsearchConfig config) { + super(client); + this.taskMaxSize = config.getProfileTaskQueryMaxSize(); + } + + @Override + public List<EBPFProfilingTask> queryTasks(EBPFProfilingProcessFinder finder, EBPFProfilingTargetType targetType, long taskStartTime, long latestUpdateTime) throws IOException { + final String index = + IndexController.LogicIndicesRegister.getPhysicalTableName(EBPFProfilingTaskRecord.INDEX_NAME); + final BoolQueryBuilder query = Query.bool(); + + if (finder != null && finder.getFinderType() != null) { Review comment: Don't check this, we should throw NPE or IllegalArgumentException, rather than doing a full table scan. ########## File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/ebpf/storage/EBPFProfilingTaskRecord.java ########## @@ -0,0 +1,123 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.apache.skywalking.oap.server.core.profiling.ebpf.storage; + +import com.google.common.base.Charsets; +import com.google.common.hash.Hashing; +import lombok.Data; +import org.apache.skywalking.oap.server.core.analysis.Stream; +import org.apache.skywalking.oap.server.core.analysis.config.NoneStream; +import org.apache.skywalking.oap.server.core.analysis.worker.NoneStreamProcessor; +import org.apache.skywalking.oap.server.core.query.type.EBPFProfilingProcessFinderType; +import org.apache.skywalking.oap.server.core.source.ScopeDeclaration; +import org.apache.skywalking.oap.server.core.storage.annotation.Column; +import org.apache.skywalking.oap.server.core.storage.type.Convert2Entity; +import org.apache.skywalking.oap.server.core.storage.type.Convert2Storage; +import org.apache.skywalking.oap.server.core.storage.type.StorageBuilder; + +import static org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.EBPF_PROFILING_TASK; + +@Data +@ScopeDeclaration(id = EBPF_PROFILING_TASK, name = "EBPFProfilingTask") +@Stream(name = EBPFProfilingTaskRecord.INDEX_NAME, scopeId = EBPF_PROFILING_TASK, + builder = EBPFProfilingTaskRecord.Builder.class, processor = NoneStreamProcessor.class) +public class EBPFProfilingTaskRecord extends NoneStream { Review comment: ```suggestion public class EBPFProfilingRecord extends NoneStream { ``` Don't take `task` every place. You have `task`, `schedule`, `record` concepts, right? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
