1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15export const dbName = 'gp.db'; 16 17export const dbVersion = 1; 18 19export const sql_t_general_info = 20 'CREATE TABLE IF NOT EXISTS ' + 21 't_general_info' + 22 '(' + 23 'sessionId TEXT PRIMARY KEY, ' + 24 'taskId TEXT NOT NULL,' + 25 'appName TEXT,' + 26 'appVersion TEXT,' + 27 'packageName TEXT,' + 28 'startTime TEXT,' + 29 'endTime TEXT,' + 30 'testDuration TEXT,' + 31 'taskName TEXT,' + 32 'testCase TEXT,' + 33 'testType TEXT,' + 34 'user TEXT,' + 35 'userId TEXT,' + 36 'projectId TEXT,' + 37 'dataSource TEXT,' + 38 'spVersion TEXT,' + 39 'deviceTypeName TEXT,' + 40 'brand TEXT,' + 41 'deviceName TEXT,' + 42 'board TEXT,' + 43 'version TEXT,' + 44 'plat TEXT,' + 45 'cpuCluster TEXT,' + 46 'sn TEXT,' + 47 'resolution TEXT,' + 48 'screenBrightness TEXT,' + 49 'volume TEXT,' + 50 'batteryVolume TEXT,' + 51 'isOnline TEXT,' + 52 'deviceNum TEXT,' + 53 'roomNumber TEXT,' + 54 'taskType TEXT' + 55 ')'; 56 57export const sql_t_index_info = 58 'CREATE TABLE IF NOT EXISTS ' + 59 't_index_info' + 60 '(' + 61 'timestamp TEXT PRIMARY KEY, ' + 62 'taskId TEXT NOT NULL, ' + 63 'flag TEXT, ' + 64 'shellBackTemp TEXT,' + 65 'shellFrameTemp TEXT,' + 66 'shellFrontTemp TEXT,' + 67 'socThermalTemp TEXT,' + 68 'systemHTemp TEXT,' + 69 'gpuTemp TEXT,' + 70 'ambientTemp TEXT,' + 71 'batteryTemp TEXT,' + 72 'ddrFrequency TEXT,' + 73 'fps TEXT,' + 74 'fpsJitters TEXT,' + 75 'cpu0Frequency TEXT,' + 76 'cpu0Load TEXT,' + 77 'cpu1Frequency TEXT,' + 78 'cpu1Load TEXT,' + 79 'cpu2Frequency TEXT,' + 80 'cpu2Load TEXT,' + 81 'cpu3Frequency TEXT,' + 82 'cpu3Load TEXT,' + 83 'cpu4Frequency TEXT,' + 84 'cpu4Load TEXT,' + 85 'cpu5Frequency TEXT,' + 86 'cpu5Load TEXT,' + 87 'cpu6Frequency TEXT,' + 88 'cpu6Load TEXT,' + 89 'cpu7Frequency TEXT,' + 90 'cpu7Load TEXT,' + 91 'cpuLoad TEXT,' + 92 'gpuFrequency TEXT,' + 93 'gpuLoad TEXT,' + 94 'currentNow TEXT,' + 95 'capacity TEXT,' + 96 'enableHiz TEXT,' + 97 'status TEXT,' + 98 'voltageNow TEXT,' + 99 'pss TEXT,' + 100 'networkUpSpeed TEXT,' + 101 'networkDownSpeed TEXT' + 102 ')'; 103 104export const task_powersensor_info = 105 'CREATE TABLE IF NOT EXISTS ' + 106 'task_powersensor_info' + 107 '(' + 108 'id TEXT PRIMARY KEY,' + 109 'taskId TEXT NOT NULL,' + 110 'sensor TEXT,' + 111 'power TEXT,' + 112 'current TEXT,' + 113 'percent TEXT' + 114 ')'; 115 116export const task_powerapp_info = 117 'CREATE TABLE IF NOT EXISTS ' + 118 'task_powerapp_info' + 119 '(' + 120 'id TEXT PRIMARY KEY,' + 121 'taskId TEXT NOT NULL,' + 122 'process TEXT,' + 123 'energy TEXT,' + 124 'percent TEXT' + 125 ')'; 126