Commit 688e8a5b by lixinming

no message

parent f757148c
......@@ -14,12 +14,11 @@ export async function getYZY(req, res) {
let {计算云资源, 使用率, 物理资源} = await getHardware();
// let 计算云资源 = {"cpu":"3568核", "内存":"4000G", "本地磁盘":"1999G", "云磁盘总量":"848484G"};
ret["api1"] = getKeyValueNumberOutData("计算云资源", 计算云资源 );
// let 使用率 = {"CPU":"63.9%", "内存":"30.4%", "本地磁盘":"29.6%", "云磁盘cds ssd池":"23%", "云磁盘cds sata池":"73%", "对象存储":"73.83%"};
ret["api2"] = getKeyValueNumberOutData("计算云资源使用率", 使用率 );
// let 物理资源 = {"物理机":"100台", "网络设备":"34台", "安全设备":"4台", "机柜":"16台"};
ret["api1"] = getKeyValueNumberOutData("计算云资源", 计算云资源 );
ret["api2"] = getKeyValueNumberOutData("计算云资源使用率", 使用率 );
ret["api3"] = getKeyValueNumberOutData("物理资源", 物理资源 );
res.send(ret);
......
......@@ -100,7 +100,7 @@ export async function initWSData() {
//在线车辆
let distinctMap = {};//{id:1}
let carData = {};//
let dp = {};//数据池 {"id":{lastMs:最新的时间, list:[] } }
export function stats(data) {
let dataType = typeof data;
......
......@@ -6,26 +6,13 @@ import { initWSData } from "./data/interface/wsData";
import { httpServer } from "./net/http_server";
async function lanuch() {
console.log("测试服务启动成功 9797");
await initConfig();//初始化配置解析
await initWSData();
httpServer.createServer(port);
await initSocketServer(socketPort);
await initData();
await initWSData();
console.log('This indicates that the server is started successfully.');
}
//test 模拟数据
async function test() {
let i = 1;
setInterval(function () {
callTestServer(i);
i++;
if (i == 30) i = 1;
}, 200)
}
lanuch();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment