All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jladder.logger.LogForDataModelByRate Maven / Gradle / Ivy

There is a newer version: 5.0.44
Show newest version
package com.jladder.logger;

import com.jladder.lang.Times;

import java.util.Date;

public class LogForDataModelByRate
{
    /// 
    /// 模版名称
    /// 
    public String tablename;
    /// 
    /// 记录总数
    /// 
    public long recordcount;
    /// 
    /// 开始时间
    /// 
    public Date starttime = Times.now();
    /// 
    /// 结束时间
    /// 
    public Date endtime;
    /// 
    /// 持续时长
    /// 
    public int duration = 0;
    /// 
    /// 单条比例
    /// 
    public String rate = "0us";
    /// 
    /// 是否应用的缓存
    /// 
    public boolean IsCache;

    public LogForDataModelByRate(String tablename){
        this.tablename = tablename;
    }
    public LogForDataModelByRate setEnd()
    {
        endtime = Times.now();
//        TimeSpan ts = EndTime.Subtract(StartTime);
//        var diff = ts.TotalMilliseconds;
//        Duration = Math.Round(diff, 0) + "ms";
//        if (RecordCount > 0)
//        {
//            Rate = Math.Round(diff*1000 / RecordCount,0) + "us";
//        }
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy