Tabnine Logo
StatDetails.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.github.endoscope.storage.StatDetails
constructor

Best Java code snippets using com.github.endoscope.storage.StatDetails.<init> (Showing top 6 results out of 315)

origin: com.github.endoscope/endoscope-ui-plugin

private StatDetails detailsInMemory(String id) {
  return Endoscope.processStats(stats -> {
    Stat s = stats.getMap().get(id);
    if( s == null ){//might happen when stats get saved and/or reset in the mean time
      return null;
    }
    s = s.deepCopy();
    StatDetails result = new StatDetails(id, s);
    return result;
  });
}
origin: com.github.endoscope/endoscope-storage-gzip

@Override
public StatDetails loadDetails(String detailsId, List<String> statsIds){
  StatDetails result = new StatDetails(detailsId, null);
  processStats(statsIds, stats -> {
    Stat stat = getDetailsOrEmpty(detailsId, stats);
    result.add(stat);
  });
  return result;
}
origin: com.github.endoscope/endoscope-storage-jdbc

protected StatDetails createDetails(String detailsId, List<GroupEntity> groups, List<StatEntity> stats) {
  StatDetails result = new StatDetails(detailsId, null);
  result.setInfo(storageInfo(null));
  groups.forEach( group -> {
    List<StatEntity> groupStats = stats.stream()
        .filter( s -> group.getId().equals(s.getGroupId()) )
        .collect(toList());
    restoreGroupStats(group, groupStats);
    Stat details = group.getMap().get(detailsId);
    result.add(details);
  });
  if( result.getMerged() == null ){
    result.setMerged(Stat.emptyStat());
  }
  return result;
}
origin: com.github.endoscope/storage-gzip

@Override
public StatDetails stat(String id, Date from, Date to, String appGroup, String appType) {
  log.debug("Searching for stat {} from {} to {}", id, getDateFormat().format(from), getDateFormat().format(to));
  StatDetails result = new StatDetails(id, null);
  listParts().stream()
      .peek( fileInfo -> log.debug("Checking {}", fileInfo.getName()))
      .filter(fileInfo -> fileInfo.inRange(from, to))
      .peek( fileInfo -> log.debug("Matches: {}", fileInfo.getName()))
      .forEach( fileInfo -> {
        Stats stats = load(fileInfo.getName());
        Stat details = stats.getMap().get(id);
        result.add(details, stats.getStartDate(), stats.getEndDate());
      });
  if( result.getMerged() == null ){
    result.setMerged(Stat.emptyStat());
  }
  return result;
}
origin: com.github.endoscope/storage-jdbc

@Override
public StatDetails stat(String rootName, Date from, Date to, String appGroup, String appType) {
  StatDetails result = new StatDetails(rootName, null);
  List<GroupEntity> groups = findGroupsInRange(from, to, appGroup, appType);
  loadTree(groups, rootName, from, to, appGroup, appType);
  groups.forEach(g -> {
    Stat details = g.getMap().get(rootName);
    result.add(details, g.getStartDate(),g.getEndDate());
  });
  if( result.getMerged() == null ){
    result.setMerged(Stat.emptyStat());
  }
  return result;
}
origin: com.github.endoscope/endoscope-ui-plugin

private StatDetails detailsForRange(String id, TimeRange range) {
  StatDetails result;
  if( canSearch(range) ){
    result = getStorage().loadDetails(id, range.getFromDate(), range.getToDate(), range.getInstance(), range.getType());
    if( inMemoryInRange(range) ){
      StatDetails current = detailsInMemory(id);
      if( current != null ){
        //we don't want to merge not set stats as it would reset min value to 0
        result.getMerged().merge(current.getMerged(), true);
      }
      result.setInfo("Added in-memory data. Original info: " + result.getInfo());
    }
  } else {
    result = detailsInMemory(id);
    result.setInfo("in-memory data only. Original info: " + result.getInfo());
  }
  return (result != null) ? result : new StatDetails(id, Stat.emptyStat());
}
com.github.endoscope.storageStatDetails<init>

Popular methods of StatDetails

  • getMerged
  • setMerged
  • add
  • setInfo
    Implementation specific information.
  • getHistogram
  • getId
  • getInfo
    Implementation specific information.

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now