feat: initialize Evergreen Health backend
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 接口/动态API输出
|
||||
/// </summary>
|
||||
public class ApiOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口名称
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 路由名称
|
||||
/// </summary>
|
||||
public string RouteName { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Magicodes.ExporterAndImporter.Core.Filters;
|
||||
using Magicodes.ExporterAndImporter.Core.Models;
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 基础存储过程输入类
|
||||
/// </summary>
|
||||
public class BaseProcInput
|
||||
{
|
||||
/// <summary>
|
||||
/// ProcId
|
||||
/// </summary>
|
||||
public string ProcId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库配置Id
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; } = SqlSugarConst.MainConfigId;
|
||||
|
||||
/// <summary>
|
||||
/// 存储过程输入参数
|
||||
/// </summary>
|
||||
/// <example>{"id":"351060822794565"}</example>
|
||||
public Dictionary<string, object> ProcParams { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 带表头名称存储过程输入类
|
||||
/// </summary>
|
||||
public class ExportProcByTMPInput : BaseProcInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
public string Template { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 带表头名称存储过程输入类
|
||||
/// </summary>
|
||||
public class ExportProcInput : BaseProcInput
|
||||
{
|
||||
public Dictionary<string, string> EHeader { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指定导出类名(有排序)存储过程输入类
|
||||
/// </summary>
|
||||
public class ExportProcInput2 : BaseProcInput
|
||||
{
|
||||
public List<string> EHeader { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前端指定列
|
||||
/// </summary>
|
||||
public class ProcExporterHeaderFilter : IExporterHeaderFilter
|
||||
{
|
||||
private Dictionary<string, Tuple<string, int>> _includeHeader;
|
||||
|
||||
public ProcExporterHeaderFilter(Dictionary<string, Tuple<string, int>> includeHeader)
|
||||
{
|
||||
_includeHeader = includeHeader;
|
||||
}
|
||||
|
||||
public ExporterHeaderInfo Filter(ExporterHeaderInfo exporterHeaderInfo)
|
||||
{
|
||||
if (_includeHeader != null && _includeHeader.Count > 0)
|
||||
{
|
||||
var key = exporterHeaderInfo.PropertyName.ToUpper();
|
||||
if (_includeHeader.ContainsKey(key))
|
||||
{
|
||||
exporterHeaderInfo.DisplayName = _includeHeader[key].Item1;
|
||||
return exporterHeaderInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
exporterHeaderInfo.ExporterHeaderAttribute.Hidden = true;
|
||||
}
|
||||
}
|
||||
return exporterHeaderInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 国密公钥私钥对输出
|
||||
/// </summary>
|
||||
public class SmKeyPairOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 私匙
|
||||
/// </summary>
|
||||
public string PrivateKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公匙
|
||||
/// </summary>
|
||||
public string PublicKey { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 接口压测输入参数
|
||||
/// </summary>
|
||||
public class StressTestInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口请求地址
|
||||
/// </summary>
|
||||
/// <example>https://gitee.com/zuohuaijun/Admin.NET</example>
|
||||
[Required(ErrorMessage = "接口请求地址不能为空")]
|
||||
public string RequestUri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求方式
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "请求方式不能为空")]
|
||||
public string RequestMethod { get; set; } = nameof(HttpMethod.Get);
|
||||
|
||||
/// <summary>
|
||||
/// 每轮请求量
|
||||
/// </summary>
|
||||
/// <example>100</example>
|
||||
[Required(ErrorMessage = "每轮请求量不能为空")]
|
||||
[Range(1, 100000, ErrorMessage = "每轮请求量必须为1-100000")]
|
||||
public int? NumberOfRequests { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 压测轮数
|
||||
/// </summary>
|
||||
/// <example>5</example>
|
||||
[Required(ErrorMessage = "压测轮数不能为空")]
|
||||
[Range(1, 10000, ErrorMessage = "压测轮数必须为1-10000")]
|
||||
public int? NumberOfRounds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大并行量(默认为当前主机逻辑处理器的数量)
|
||||
/// </summary>
|
||||
/// <example>500</example>
|
||||
[Range(0, 10000, ErrorMessage = "最大并行量必须为0-10000")]
|
||||
public int? MaxDegreeOfParallelism { get; set; } = Environment.ProcessorCount;
|
||||
|
||||
/// <summary>
|
||||
/// 请求参数
|
||||
/// </summary>
|
||||
public List<KeyValuePair<string, string>> RequestParameters { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 请求头参数
|
||||
/// </summary>
|
||||
public Dictionary<string, string> Headers { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 路径参数
|
||||
/// </summary>
|
||||
public Dictionary<string, string> PathParameters { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Query参数
|
||||
/// </summary>
|
||||
public Dictionary<string, string> QueryParameters { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 接口压测输出参数
|
||||
/// </summary>
|
||||
public class StressTestOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 总请求次数
|
||||
/// </summary>
|
||||
public long TotalRequests { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总用时(秒)
|
||||
/// </summary>
|
||||
public double TotalTimeInSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成功请求次数
|
||||
/// </summary>
|
||||
public long SuccessfulRequests { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 失败请求次数
|
||||
/// </summary>
|
||||
public long FailedRequests { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 每秒查询率(QPS)
|
||||
/// </summary>
|
||||
public double QueriesPerSecond { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double MinResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double MaxResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 平均响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double AverageResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P10 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile10ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P25 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile25ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P50 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile50ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P75 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile75ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P90 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile90ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P99 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile99ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// P999 响应时间(毫秒)
|
||||
/// </summary>
|
||||
public double Percentile999ResponseTime { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user