Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-7235 Add initial PerformanceObserver and use it for tldraw. #5069

Merged
merged 32 commits into from
Jul 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a670c93
Add initial PerformanceObserver and use it.
CeEv Jun 18, 2024
7edc690
change used log level to alert
CeEv Jun 18, 2024
56f0a78
Revert last commit
CeEv Jun 18, 2024
076ff46
Fix console, seperate logging envirement, pass clock to log
CeEv Jun 24, 2024
a3fb636
improve readability of measure logs
CeEv Jun 26, 2024
1b9719a
fix test setup
CeEv Jun 26, 2024
c7dc6fe
linter
CeEv Jun 26, 2024
30b944c
rename tldrawEntity const to avoid misunderstanding with ydoc
CeEv Jun 26, 2024
c28115b
fix typo
CeEv Jun 26, 2024
c081704
renames
CeEv Jun 26, 2024
ca37722
rename
CeEv Jun 26, 2024
2e85f10
push additional metric
CeEv Jun 26, 2024
af014dd
Merge branch 'main' into BC-7235-performance-observer
CeEv Jun 27, 2024
04fa394
Fix descriptions.
CeEv Jun 27, 2024
983c97c
Merge branch 'BC-7235-performance-observer' of https://github.com/hpi…
CeEv Jun 27, 2024
b712933
Restructure logging
dyedwiper Jun 27, 2024
fb992fd
Restructure init of perf observer
dyedwiper Jun 28, 2024
226e50a
Fix typos
dyedwiper Jun 28, 2024
737541d
Remove unused loggers
dyedwiper Jun 28, 2024
f1ad28d
Update logger context
dyedwiper Jun 28, 2024
efc6868
Remove unused method
dyedwiper Jun 28, 2024
a6641ae
Cluster entries in logs
dyedwiper Jul 1, 2024
59c476e
Fix typo
dyedwiper Jul 1, 2024
37adbf7
Make observer a singleton
dyedwiper Jul 1, 2024
a5641d7
remove todo
CeEv Jul 1, 2024
b2c25b8
Merge branch 'main' into BC-7235-performance-observer
CeEv Jul 1, 2024
c5fe421
Remove detail from logging context
CeEv Jul 1, 2024
7eedadb
push initial test setup für performance observer
CeEv Jul 1, 2024
352534b
add measure test - wip
CeEv Jul 1, 2024
0e37d83
Fix test setup for performance measure test.
CeEv Jul 2, 2024
ecbbf3c
fix type
CeEv Jul 2, 2024
e8b2237
Merge branch 'main' into BC-7235-performance-observer
CeEv Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert last commit
  • Loading branch information
CeEv committed Jun 18, 2024
commit 56f0a78abc90c27b8aa3765626502318efbf7a9b
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ import { PerformanceObserver, PerformanceEntry } from 'node:perf_hooks';
import { Loggable, LoggableMessage } from '../loggable';

interface InfoLogger {
alert(input: Loggable): void;
info(input: Loggable): void;
}

@@ -51,12 +50,12 @@ let obs: PerformanceObserver | null = null;
*/
export const initilisedPerformanceObserver = (infoLogger: InfoLogger): PerformanceObserver => {
if (obs === null) {
infoLogger.alert(new InitalisePerformanceLoggable());
infoLogger.info(new InitalisePerformanceLoggable());
// eslint-disable-next-line @typescript-eslint/no-unused-vars
obs = new PerformanceObserver((perfObserverList, observer) => {
const entries = perfObserverList.getEntries();
const loggable = new MeasureLoggable(entries);
infoLogger.alert(loggable);
infoLogger.info(loggable);
});
obs.observe({ type: 'measure', buffered: true });
}
Loading