Lines Matching refs:profiler
277 GCProfiler* profiler = static_cast<GCProfiler*>(data);
278 if (profiler->current_gc_type != 0) {
281 JSONWriter* writer = profiler->writer();
287 profiler->current_gc_type = gc_type;
288 profiler->start_time = uv_hrtime();
295 GCProfiler* profiler = static_cast<GCProfiler*>(data);
296 if (profiler->current_gc_type != gc_type) {
299 JSONWriter* writer = profiler->writer();
300 profiler->current_gc_type = 0;
301 writer->json_keyvalue("cost", (uv_hrtime() - profiler->start_time) / 1e3);
302 profiler->start_time = 0;
346 GCProfiler* profiler;
347 ASSIGN_OR_RETURN_UNWRAP(&profiler, args.Holder());
348 if (profiler->state != GCProfiler::GCProfilerState::kInitialized) {
351 profiler->writer()->json_start();
352 profiler->writer()->json_keyvalue("version", 1);
356 profiler->writer()->json_keyvalue("startTime",
359 profiler->writer()->json_keyvalue("startTime", 0);
361 profiler->writer()->json_arraystart("statistics");
363 static_cast<void*>(profiler));
365 static_cast<void*>(profiler));
366 profiler->state = GCProfiler::GCProfilerState::kStarted;
371 GCProfiler* profiler;
372 ASSIGN_OR_RETURN_UNWRAP(&profiler, args.Holder());
373 if (profiler->state != GCProfiler::GCProfilerState::kStarted) {
376 profiler->writer()->json_arrayend();
379 profiler->writer()->json_keyvalue("endTime",
382 profiler->writer()->json_keyvalue("endTime", 0);
384 profiler->writer()->json_end();
385 profiler->state = GCProfiler::GCProfilerState::kStopped;
386 auto string = profiler->out_stream()->str();