MCPcopy Create free account
hub / github.com/TurtleTrace2026/TurtleTrace / getDatabaseStats

Function getDatabaseStats

src/services/stockDatabase.ts:172–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170
171// 获取数据库统计信息
172export function getDatabaseStats() {
173 initDatabase()
174 const industries = getIndustries()
175 const exchanges = new Set(allStocks.map(s => s.exchange))
176
177 return {
178 totalStocks: allStocks.length,
179 industries: industries.length,
180 exchanges: exchanges.size,
181 exchangeList: Array.from(exchanges),
182 }
183}

Callers

nothing calls this directly

Calls 2

initDatabaseFunction · 0.85
getIndustriesFunction · 0.85

Tested by

no test coverage detected