-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: experimental - Studio Overview and Performance Widgets (#8292)
* First pass at a timeseries line chart by span type * Contributing * Implement LineCharts for types * Refactor time series and bar charts * First pass at bar list overview of types * Added bar list span count overview * Latest * Sql is now indigo * Update packages/studio/frontend/src/Pages/Overview.tsx Co-authored-by: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com> --------- Co-authored-by: Josh GM Walker <56300765+Josh-Walker-GM@users.noreply.github.com>
- Loading branch information
Showing
44 changed files
with
1,791 additions
and
1,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Contribute to Studio | ||
|
||
## Build | ||
|
||
### Front End | ||
|
||
* `cd packages/studio/frontend` | ||
* be sure to `yarn install` | ||
* `yarn build --emptyOutDir` or `yarn build --emptyOutDir --watch` | ||
|
||
### Back End | ||
|
||
The backend will build and sync if you're using the project sync from `yarn rwfw` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { getDatabase } from '../database' | ||
|
||
export async function seriesTypeBarList( | ||
_parent: unknown, | ||
{ | ||
timeLimit, | ||
}: { | ||
timeLimit: number | ||
} | ||
) { | ||
const db = await getDatabase() | ||
const stmt = await db.prepare(` | ||
SELECT | ||
TYPE AS series_type, | ||
CASE | ||
WHEN instr(brief, '/*') > 0 THEN | ||
substr(substr(brief, 1, instr(brief, '/*') - 1), 0, 255) | ||
ELSE | ||
brief | ||
END AS series_name, | ||
count(brief) AS quantity | ||
FROM | ||
span | ||
WHERE | ||
datetime (start_nano / 1000000000, 'unixepoch', 'utc') >= datetime ('now', ?, 'utc') | ||
AND brief IS NOT NULL | ||
GROUP BY | ||
series_type, | ||
series_name | ||
ORDER BY | ||
quantity DESC; | ||
`) | ||
|
||
const result = await stmt.all(`-${timeLimit} seconds`) | ||
await stmt.finalize() | ||
|
||
return result | ||
} |
2 changes: 1 addition & 1 deletion
2
...end/assets/SchemaReference.es-dabf3290.js → ...end/assets/SchemaReference.es-a297b8ec.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...frontend/assets/brace-fold.es-ef663596.js → ...frontend/assets/brace-fold.es-b1e55026.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.