菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
378
0

Drip is a launcher for the Java Virtual Machine that provides much faster startup times than the java command. The drip script is intended to be a drop-in replacement for the java command, only faster

原创
05/13 14:22
阅读数 36270

小结:

1、初始化jvm;

2、第一次唤醒java命令不快,后续快;

 

https://github.com/elastic/logstash

Advanced: Drip Launcher

Drip is a tool that solves the slow JVM startup problem while developing Logstash. The drip script is intended to be a drop-in replacement for the java command. We recommend using drip during development, in particular for running tests. Using drip, the first invocation of a command will not be faster but the subsequent commands will be swift.

To tell logstash to use drip, set the environment variable JAVACMD=`which drip`.

Example (but see the Testing section below before running rspec for the first time):

JAVACMD=`which drip` bin/rspec

 

https://github.com/ninjudd/drip

Pre-Initialization

By default, Drip only loads your main class at startup, but you can tell Drip to run additional code at startup. This can be used to load classes or execute any initialization code you like. For a language like Clojure, which compiles code on-the-fly, this can be used to precompile commonly used code by requiring it.

To tell Drip how to initialize a new JVM, use the DRIP_INIT and DRIP_INIT_CLASS environment variables. DRIP_INIT should be a newline-separated list of args to be passed to the main() function of DRIP_INIT_CLASSDRIP_INIT_CLASS defaults to the main class the JVM was started with.

 

发表评论

0/200
378 点赞
0 评论
收藏