Files
A-Tune/api/profile/profile.proto
openeuler-ci-bot a574db9514 !574 A-Tune识别应用场景及动态推荐调优参数的实现-修改分类识别go客户端和服务端代码
From: @SWWBF 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
2023-10-21 02:21:15 +00:00

150 lines
3.7 KiB
Protocol Buffer
Executable File

/*
* Copyright (c) 2019 Huawei Technologies Co., Ltd.
* A-Tune is licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v2 for more details.
* Create: 2019-10-29
*/
syntax = "proto3";
package profile;
// The transporter service definition.
service ProfileMgr {
rpc Profile(ProfileInfo) returns (stream AckCheck) {}
rpc CheckInitProfile(ProfileInfo) returns (stream AckCheck) {}
rpc Analysis(AnalysisMessage) returns (stream AckCheck) {}
rpc Tuning(stream TuningMessage) returns (stream TuningMessage) {}
rpc ListWorkload(ProfileInfo) returns (stream ListMessage) {}
rpc UpgradeProfile(ProfileInfo) returns (stream AckCheck) {}
rpc InfoProfile(ProfileInfo) returns (stream ProfileInfo) {}
rpc CheckActiveProfile(ProfileInfo) returns (stream AckCheck) {}
rpc ProfileRollback(ProfileInfo) returns (stream AckCheck) {}
rpc Collection(CollectFlag) returns (stream AckCheck) {}
rpc Training(TrainMessage) returns (stream AckCheck) {}
rpc Define(DefineMessage) returns (Ack) {}
rpc Delete(ProfileInfo) returns (Ack) {}
rpc Update(ProfileInfo) returns (Ack) {}
rpc Schedule(ScheduleMessage) returns (stream AckCheck) {}
rpc Generate(ProfileInfo) returns (stream AckCheck) {}
rpc Detecting(DetectMessage) returns (stream AckCheck) {}
}
message ListMessage {
string WorkloadType = 1;
string ProfileNames = 2;
string Active = 3;
}
message ProfileInfo {
string Name = 1;
bytes Content = 2;
}
message AnalysisMessage {
string Name = 1;
string Model = 2;
bool Characterization = 3;
bool Bottleneck = 4;
string Times = 5;
string Flag = 6;
string Id = 7;
}
message Ack {
string Status = 1;
}
message AckCheck {
string Name = 1;
string Status = 2;
string Description = 3;
}
message ProfileLog {
int64 Id = 1;
string ProfileId = 2;
string Timestamp = 3;
}
message CollectFlag {
int64 Interval = 1;
int64 Duration = 2;
string Workload = 3;
string OutputDir = 4;
string Block = 5;
string Network = 6;
string Type = 7;
}
message TrainMessage {
string DataPath = 1;
string ModelName = 2;
}
message DetectMessage {
string AppName = 1;
string DetectPath = 2;
}
message DefineMessage {
string ServiceType = 1;
string ApplicationName = 2;
string ScenarioName = 3;
bytes Content = 4;
}
message ScheduleMessage {
string App = 1;
string Type = 2;
string Strategy = 3;
}
message TuningMessage {
string name = 1;
string engine = 2;
bytes content = 3;
enum status {
JobInit = 0;
JobRestart = 1;
BenchMark= 2;
Restore = 3;
Ending = 4;
Display = 5;
SyncConfig = 6;
Detail = 7;
Threshold = 8;
JobCreate = 9;
GetInitialConfig = 10;
GetHistoryPath = 11;
}
status state = 4;
int32 RandomStarts = 5;
string FeatureFilterEngine = 6;
int32 FeatureFilterCycle = 7;
int32 FeatureFilterIters = 8;
bool Restart = 9;
bool FeatureFilter = 10;
TuningHistory TuningLog = 11;
int32 SplitCount = 12;
int32 FeatureFilterCount = 13;
double EvalFluctuation = 14;
string FeatureSelector = 15;
string InitialConfig = 16;
[]string HistoryPath = 17;
}
message TuningHistory {
string BaseEval = 1;
string MinEval = 2;
string SumEval = 3;
int64 TotalTime = 4;
int32 Starts = 5;
}