mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Implement basic Time To First Paint and First Contentful Paint PWMs
This commit is contained in:
parent
20a3b0236d
commit
892b30edca
20 changed files with 213 additions and 10 deletions
|
@ -224,6 +224,9 @@ pub struct Opts {
|
|||
|
||||
/// Unminify Javascript.
|
||||
pub unminify_js: bool,
|
||||
|
||||
/// Print Progressive Web Metrics to console.
|
||||
pub print_pwm: bool,
|
||||
}
|
||||
|
||||
fn print_usage(app: &str, opts: &Options) {
|
||||
|
@ -544,6 +547,7 @@ pub fn default_opts() -> Opts {
|
|||
signpost: false,
|
||||
certificate_path: None,
|
||||
unminify_js: false,
|
||||
print_pwm: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,6 +612,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
opts.optopt("", "profiler-db-user", "Profiler database user", "");
|
||||
opts.optopt("", "profiler-db-pass", "Profiler database password", "");
|
||||
opts.optopt("", "profiler-db-name", "Profiler database name", "");
|
||||
opts.optflag("", "print-pwm", "Print Progressive Web Metrics");
|
||||
|
||||
let opt_match = match opts.parse(args) {
|
||||
Ok(m) => m,
|
||||
|
@ -843,6 +848,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
signpost: debug_options.signpost,
|
||||
certificate_path: opt_match.opt_str("certificate-path"),
|
||||
unminify_js: opt_match.opt_present("unminify-js"),
|
||||
print_pwm: opt_match.opt_present("print-pwm"),
|
||||
};
|
||||
|
||||
set_defaults(opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue