tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TelemetryTimers.h (964B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: set ts=8 sts=2 et sw=2 tw=80:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef js_TelemetryTimers_h
      8 #define js_TelemetryTimers_h
      9 
     10 #include "mozilla/TimeStamp.h"
     11 
     12 #include "jstypes.h"
     13 
     14 struct JS_PUBLIC_API JSContext;
     15 
     16 namespace JS {
     17 
     18 /** Timing information for telemetry purposes **/
     19 struct JSTimers {
     20  mozilla::TimeDuration executionTime;       // Total time spent executing
     21  mozilla::TimeDuration delazificationTime;  // Total time spent delazifying
     22 };
     23 
     24 extern JS_PUBLIC_API void SetMeasuringExecutionTimeEnabled(JSContext* cx,
     25                                                           bool value);
     26 extern JS_PUBLIC_API JSTimers GetJSTimers(JSContext* cx);
     27 
     28 }  // namespace JS
     29 
     30 #endif  // js_TelemetryTimers_h