@@ -169,20 +169,23 @@ impl SelfProfiler {
169
169
profiler
170
170
}
171
171
172
+ #[ inline]
172
173
pub fn start_activity ( & mut self , category : ProfileCategory ) {
173
174
self . record ( ProfilerEvent :: GenericActivityStart {
174
175
category,
175
176
time : Instant :: now ( ) ,
176
177
} )
177
178
}
178
179
180
+ #[ inline]
179
181
pub fn end_activity ( & mut self , category : ProfileCategory ) {
180
182
self . record ( ProfilerEvent :: GenericActivityEnd {
181
183
category,
182
184
time : Instant :: now ( ) ,
183
185
} )
184
186
}
185
187
188
+ #[ inline]
186
189
pub fn record_computed_queries (
187
190
& mut self ,
188
191
query_name : & ' static str ,
@@ -196,13 +199,15 @@ impl SelfProfiler {
196
199
} )
197
200
}
198
201
202
+ #[ inline]
199
203
pub fn record_query_hit ( & mut self , query_name : & ' static str , category : ProfileCategory ) {
200
204
self . record ( ProfilerEvent :: QueryCacheHit {
201
205
query_name,
202
206
category,
203
207
} )
204
208
}
205
209
210
+ #[ inline]
206
211
pub fn start_query ( & mut self , query_name : & ' static str , category : ProfileCategory ) {
207
212
self . record ( ProfilerEvent :: QueryStart {
208
213
query_name,
@@ -211,6 +216,7 @@ impl SelfProfiler {
211
216
} ) ;
212
217
}
213
218
219
+ #[ inline]
214
220
pub fn end_query ( & mut self , query_name : & ' static str , category : ProfileCategory ) {
215
221
self . record ( ProfilerEvent :: QueryEnd {
216
222
query_name,
@@ -219,6 +225,7 @@ impl SelfProfiler {
219
225
} )
220
226
}
221
227
228
+ #[ inline]
222
229
fn record ( & mut self , event : ProfilerEvent ) {
223
230
let thread_id = std:: thread:: current ( ) . id ( ) ;
224
231
let events = self . events . entry ( thread_id) . or_default ( ) ;
0 commit comments