console: phương thức tĩnh profile()

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Note: This feature is available in Web Workers.

Phương thức tĩnh console.profile() bắt đầu ghi một hồ sơ hiệu năng (ví dụ: công cụ hiệu năng của Firefox).

Bạn có thể tùy chọn cung cấp một đối số để đặt tên cho hồ sơ, nhờ đó có thể dừng riêng hồ sơ đó nếu đang có nhiều hồ sơ được ghi. Xem console.profileEnd() để biết đối số này được diễn giải như thế nào.

Để dừng việc ghi, hãy gọi console.profileEnd().

Cú pháp

js
console.profile(profileName)

Tham số

profileName Optional

Tên dùng cho hồ sơ.

Giá trị trả về

Không có (undefined).

Tương thích trình duyệt

Xem thêm