本文整理汇总了Golang中flag.Float64Var函数的典型用法代码示例。如果您正苦于以下问题:Golang Float64Var函数的具体用法?Golang Float64Var怎么用?Golang Float64Var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Float64Var函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
    flag.IntVar(&qsConfig.PoolSize, "queryserver-config-pool-size", DefaultQsConfig.PoolSize, "query server connection pool size, connection pool is used by regular queries (non streaming, not in a transaction)")
    flag.IntVar(&qsConfig.StreamPoolSize, "queryserver-config-stream-pool-size", DefaultQsConfig.StreamPoolSize, "query server stream pool size, stream pool is used by stream queries: queries that return results to client in a streaming fashion")
    flag.IntVar(&qsConfig.TransactionCap, "queryserver-config-transaction-cap", DefaultQsConfig.TransactionCap, "query server transaction cap is the maximum number of transactions allowed to happen at any given point of a time for a single vttablet. E.g. by setting transaction cap to 100, there are at most 100 transactions will be processed by a vttablet and the 101th transaction will be blocked (and fail if it cannot get connection within specified timeout)")
    flag.Float64Var(&qsConfig.TransactionTimeout, "queryserver-config-transaction-timeout", DefaultQsConfig.TransactionTimeout, "query server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value")
    flag.IntVar(&qsConfig.MaxResultSize, "queryserver-config-max-result-size", DefaultQsConfig.MaxResultSize, "query server max result size, maximum number of rows allowed to return from vttablet for non-streaming queries.")
    flag.IntVar(&qsConfig.MaxDMLRows, "queryserver-config-max-dml-rows", DefaultQsConfig.MaxDMLRows, "query server max dml rows per statement, maximum number of rows allowed to return at a time for an upadte or delete with either 1) an equality where clauses on primary keys, or 2) a subselect statement. For update and delete statements in above two categories, vttablet will split the original query into multiple small queries based on this configuration value. ")
    flag.IntVar(&qsConfig.StreamBufferSize, "queryserver-config-stream-buffer-size", DefaultQsConfig.StreamBufferSize, "query server stream buffer size, the maximum number of bytes sent from vttablet for each stream call.")
    flag.IntVar(&qsConfig.QueryCacheSize, "queryserver-config-query-cache-size", DefaultQsConfig.QueryCacheSize, "query server query cache size, maximum number of queries to be cached. vttablet analyzes every incoming query and generate a query plan, these plans are being cached in a lru cache. This config controls the capacity of the lru cache.")
    flag.Float64Var(&qsConfig.SchemaReloadTime, "queryserver-config-schema-reload-time", DefaultQsConfig.SchemaReloadTime, "query server schema reload time, how often vttablet reloads schemas from underlying MySQL instance in seconds. vttablet keeps table schemas in its own memory and periodically refreshes it from MySQL. This config controls the reload time.")
    flag.Float64Var(&qsConfig.QueryTimeout, "queryserver-config-query-timeout", DefaultQsConfig.QueryTimeout, "query server query timeout (in seconds), this is the query timeout in vttablet side. If a query takes more than this timeout, it will be killed.")
    flag.Float64Var(&qsConfig.TxPoolTimeout, "queryserver-config-txpool-timeout", DefaultQsConfig.TxPoolTimeout, "query server transaction pool timeout, it is how long vttablet waits if tx pool is full")
    flag.Float64Var(&qsConfig.IdleTimeout, "queryserver-config-idle-timeout", DefaultQsConfig.IdleTimeout, "query server idle timeout (in seconds), vttablet manages various mysql connection pools. This config means if a connection has not been used in given idle timeout, this connection will be removed from pool. This effectively manages number of connection objects and optimize the pool performance.")
    flag.BoolVar(&qsConfig.StrictMode, "queryserver-config-strict-mode", DefaultQsConfig.StrictMode, "allow only predictable DMLs and enforces MySQL's STRICT_TRANS_TABLES")
    // tableacl related configurations.
    flag.BoolVar(&qsConfig.StrictTableAcl, "queryserver-config-strict-table-acl", DefaultQsConfig.StrictTableAcl, "only allow queries that pass table acl checks")
    flag.BoolVar(&qsConfig.EnableTableAclDryRun, "queryserver-config-enable-table-acl-dry-run", DefaultQsConfig.EnableTableAclDryRun, "If this flag is enabled, tabletserver will emit monitoring metrics and let the request pass regardless of table acl check results")
    flag.StringVar(&qsConfig.TableAclExemptACL, "queryserver-config-acl-exempt-acl", DefaultQsConfig.TableAclExemptACL, "an acl that exempt from table acl checking (this acl is free to access any vitess tables).")
    flag.BoolVar(&qsConfig.TerseErrors, "queryserver-config-terse-errors", DefaultQsConfig.TerseErrors, "prevent bind vars from escaping in returned errors")
    flag.BoolVar(&qsConfig.EnablePublishStats, "queryserver-config-enable-publish-stats", DefaultQsConfig.EnablePublishStats, "set this flag to true makes queryservice publish monitoring stats")
    flag.StringVar(&qsConfig.StatsPrefix, "stats-prefix", DefaultQsConfig.StatsPrefix, "prefix for variable names exported via expvar")
    flag.StringVar(&qsConfig.DebugURLPrefix, "debug-url-prefix", DefaultQsConfig.DebugURLPrefix, "debug url prefix, vttablet will report various system debug pages and this config controls the prefix of these debug urls")
    flag.StringVar(&qsConfig.PoolNamePrefix, "pool-name-prefix", DefaultQsConfig.PoolNamePrefix, "pool name prefix, vttablet has several pools and each of them has a name. This config specifies the prefix of these pool names")
    flag.BoolVar(&qsConfig.EnableAutoCommit, "enable-autocommit", DefaultQsConfig.EnableAutoCommit, "if the flag is on, a DML outsides a transaction will be auto committed.")
}

开发者ID:dumbunny,项目名称:vitess,代码行数:25,代码来源:config.go

示例2: main

func main() {
    var (
        in     string
        out    string
        force  bool
        xScale float64
        yScale float64
    )
    flag.StringVar(&in, "i", "", "path to input text file. If unspecified or "+
        "set to '-', stdin is used")
    flag.StringVar(&out, "o", "", "path to output SVG file. If unspecified or "+
        "set to '-', stdout is used")
    flag.BoolVar(&force, "f", false, "overwrite existing output file")
    flag.Float64Var(&xScale, "x", asciiart.XScale,
        "number of pixels to scale each unit on the x-axis to")
    flag.Float64Var(&yScale, "y", asciiart.YScale,
        "number of pixels to scale each unit on the y-axis to")
    flag.Parse()
    if flag.NArg() != 0 {
        usage()
    }
    // work around defer not working after os.Exit()
    if err := aa2svgMain(out, in, force, xScale, yScale); err != nil {
        fatal(err)
    }
}

开发者ID:frankbraun,项目名称:asciiart,代码行数:26,代码来源:aa2svg.go

示例3: initFlags

func initFlags() {
    flag.BoolVar(&flagTest, "test", false, "Don't change any orders. Just output.")
    flag.StringVar(&flagExchange, "exchange", "bitstamp", "Exchange to connect to.")
    flag.StringVar(&flagApiKey, "api_key", "", "Bitstamp API key")
    flag.StringVar(&flagApiSecret, "api_secret", "", "Bitstamp API secret")
    flag.StringVar(&flagClientId, "client_id", "", "Bitstamp client ID")
    flag.Float64Var(
        &flagSpread, "spread", 2.0, "Percentage distance between buy/sell price")
    flag.Float64Var(
        &flagBtcRatio, "btc_ratio", 0.5, "Ratio of capital that should be BTC")
    flag.BoolVar(
        &flagFeeRound, "fee_round", false,
        "Round order size up such that the fee is an integer number of cents.")
    flag.Float64Var(
        &flagOffsetUsd, "offset_usd", 0,
        "Offset the USD balance before determining which orders to make.")
    flag.Float64Var(
        &flagOffsetBtc, "offset_btc", 0,
        "Offset the BTC balance before determining which orders to make.")
    flag.Float64Var(
        &flagMinAmount, "min_amount", 0,
        "Minimum amount of BTC to buy/sell")
    flag.BoolVar(
        &flagFeeAlwaysUsd, "fee_always_usd", false,
        "Whether the fee is always paid from USD. "+
            "Otherwise it's paid from BTC if BTC are bought.")
    flag.Parse()

    if flagApiKey == "" || flagApiSecret == "" {
        fmt.Printf("--api_key and --api_secret must be specified\n")
        os.Exit(1)
    }
}

开发者ID:dskloet,项目名称:bitcoin,代码行数:33,代码来源:flags.go

示例4: init

func init() {
    flag.StringVar(&in, "in", "", "file name of a BAM file to be processed.")
    flag.StringVar(&format, "format", "svg", "specifies the output format of the example: eps, jpg, jpeg, pdf, png, svg, and tiff.")
    flag.Var(&highlight, "highlight", "comma separated set of chromosome names to highlight.")
    flag.StringVar(&palname, "palette", "Set1", "specify the palette name for highlighting.")
    flag.Float64Var(&maxTrace, "tracemax", 0, "set the maximum value for the outer trace if not zero.")
    flag.Float64Var(&maxCounts, "countmax", 0, "set the maximum value for the inner trace if not zero.")
    help := flag.Bool("help", false, "output this usage message.")
    flag.Parse()
    if *help {
        flag.Usage()
        os.Exit(0)
    }
    if in == "" {
        flag.Usage()
        os.Exit(1)
    }
    for _, s := range []string{"eps", "jpg", "jpeg", "pdf", "png", "svg", "tiff"} {
        if format == s {
            return
        }
    }
    flag.Usage()
    os.Exit(1)
}

开发者ID:henmt,项目名称:2015,代码行数:25,代码来源:render-heat.go

示例5: init

func init() {
    flag.StringVar(&in, "in", "", "BAM file to be processed.")
    flag.StringVar(&annot, "annot", "", "file name of a GFF file containing annotations.")
    flag.Float64Var(&thresh, "thresh", 1, "log score threshold for inclusion of feature.")
    flag.Var(&classes, "class", "comma separated set of annotation classes to analyse.")
    flag.BoolVar(&pretty, "pretty", true, "outfile JSON data indented.")
    flag.IntVar(&minLength, "min", 20, "minimum length read considered.")
    flag.IntVar(&maxLength, "max", 35, "maximum length read considered.")
    flag.IntVar(&minId, "minid", 90, "minimum percentage identity for mapped bases.")
    flag.IntVar(&minQ, "minQ", 20, "minimum per-base sequence quality.")
    flag.Float64Var(&minAvQ, "minAvQ", 30, "minimum average per-base sequence quality.")
    flag.IntVar(&mapQ, "mapQ", 0, "minimum mapping quality [0, 255).")
    flag.IntVar(&binLength, "bin", 1e7, "bin length.")
    help := flag.Bool("help", false, "output this usage message.")
    flag.Parse()
    mapQb = byte(mapQ)
    if *help {
        flag.Usage()
        os.Exit(0)
    }
    if in == "" || !annotOK(annot, classes) || mapQ < 0 || mapQ > 254 {
        flag.Usage()
        os.Exit(1)
    }
}

开发者ID:henmt,项目名称:2015,代码行数:25,代码来源:trans-diff.go

最后编辑: kuteng  文档更新时间: 2021-08-23 19:14   作者:kuteng