博客主机

检测Java对象所占内存大小

Don't pay the price for hidden class fieldsBy Vladimir Roubtsov, JavaWorld.com, 08/16/02 Recently, I helped design a Java server application that resembled an in-memory database. That is, we biased the design toward caching tons of data in memory to provide super-fast query performance. Once we got the prototype running, we naturally decided to profile the data memory footpr...

软件项目版本号的命名格式

版本控制比较普遍的 3 种命名格式 : 一、 GNU 风格的版本号命名格式 : 主版本号 . 子版本号 [. 修正版本号 [. 编译版本号 ]] 英文对照 : Major_Version_Number.Minor_Version_Number[.Revision_Number[.Build_Number]] 示例 : 1.2.1, 2.0, 5.0.0 build-13124 二、 Windows 风格的版本号命名格式 : 主版本号 . 子版本号 [ 修正版本号 [. 编译版本号 ]] 英文对照 : Major_Version_Number.Minor_...

数字摘要

public static void main(String[] args) { String old =""; try { for (int i = 0; i < 10; i++) { String beforeDegist = "asdf"; System.out.println("摘要前:" + beforeDegist); // 初始信息要转换成字节流的形式 byte[] plainText; plainText = beforeDegist.getBytes("UTF-8"); ...

任务

1.实现完整的Rank View2.在run dialog里添加选择算法的选项,包括trantula,CBI等,以便算出Rank

JVM监控工具介绍

jstatd启动jvm监控服务。它是一个基于rmi的应用,向远程机器提供本机jvm应用程序的信息。默认端口1099。实例:jstatd -J-Djava.security.policy=my.policy my.policy文件需要自己建立,内如如下:grant codebase "file:$JAVA_HOME/lib/tools.jar" { permission java.security.AllPermission;};这是安全策略文件,因为jdk对jvm做了jaas的安全检测,所以我们必须设置一些策略,使得jstatd被允许作网络操作 jp...

统计代码行数的类

import java.io.File;import java.io.FileNotFoundException;import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException; public class CountCodeLines { static int codeLines = 0; static int whiteLines = 0; static int commentLines = 0; static int tatolLines = 0; static boolean bComment = false; public static void main(String[] args) { StringBuffer pat...

毕设告休5天,先考试

前景: 修改instrument使用thread而不是vm,加快速度 修改testcasemodify仅仅修改相关类,需要研究一下junit或者使用soot查看resolveclass,加快速度 从xml文件中读取suspicious文件,构造新的problems view,并根据constructure.xml结构化视图,添加marker 增加副产品中的coverage分析。 ----------------- 以上需要在中期前完成 1月1号开始写报告和做PPT,10号中期答辩。 增加cfg中的分析浏览。

项目中counter打印的几种方法思考

项目中需要在class文件中加入probe(常见是使用静态变量保存),那么在什么时候dump out? 首先由于是测试程序,被测试的程序本身就可能会随时出错,所以该在何处dump profile 信息呢。在由别的程序调用时我们可以用try来捕获所有异常,在finally中收集信息。这就要求是在同一个jvm中。由于java中没有析构函数的说法,而garbage清理对象的时间我们也无法确定。在项目过程中,在命令行和测试底层功能时我是...

Why does JUnit only report the first failure in a single test?

Why does JUnit only report the first failure in a single test? (Submitted by: J. B. Rainsberger) Reporting multiple failures in a single test is generally a sign that the test does too much, compared to what a unit test ought to do. Usually this means either that the test is really a functional/acceptance/customer test or, if it is ...

eclipse plugin开发过程中也有几个心得

另外在实践eclipse plugin开发过程中也有几个心得: 1、如果开发plugin,所有的依赖库都要包含到 Plug-in Dependencies 中;而不能只是引入到工程中。2、如何输出到console:MessageConsole mc=new MessageConsole("****",null);IConsole[] cs=new IConsole[1];cs[0]=mc;ConsolePlugin.getDefault().getConsoleManager().addConsoles(cs);mc.activate();PrintStream out=new PrintStream( mc.newOutputStre...
Copyright © 小小的数据技术梦想 保留所有权利.   Theme  Ality 浙ICP备12043346号-1

用户登录

分享到: