gclog/
args.rs

1// Copyright 2022 Dremio
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14use clap::Parser;
15
16// this is some black magic provided by https://docs.rs/built/latest/built/
17// the build.rs file at the package root will write out the built.rs
18// which is then populated with a bunch of constants, in this case we are
19// most interested in finding the package version so we don't have to write it in
20// two places
21pub mod built_info {
22    // The file has been placed there by the build script.
23    include!(concat!(env!("OUT_DIR"), "/built.rs"));
24}
25/// Arguments for dqdrust
26#[derive(Parser)]
27#[clap(
28    author = "Ryan Svihla",
29    version = built_info::PKG_VERSION,
30    about = "gclog analyzes a jdk8 gc log",
31    long_about = "gclog analyzes a jdk8 gc log for a first pass diagnostic, it will not find all things, but it will help with the obvious things",
32)]
33#[clap(propagate_version = true)]
34pub struct Args {
35    #[clap()]
36    /// gclog file to parse
37    pub file_name: String,
38}