Examples of Gauge


Examples of com.codahale.metrics.Gauge

                    2 * histograms.size() + 2 * timers.size()); // something like that


            for (Map.Entry<String, Gauge> gaugeEntry : gauges.entrySet()) {
                DemuxedKey key = new DemuxedKey(gaugeEntry.getKey());
                Gauge gauge = gaugeEntry.getValue();

                Object valueObj = gauge.getValue();
                if (valueObj == null) {
                    continue;
                }

                String valueStr = valueObj.toString();
View Full Code Here

Examples of com.codahale.metrics.Gauge

            List<MetricDatum> data = new ArrayList<MetricDatum>(gauges.size() + counters.size() + histograms.size() +
                    meters.size() + timers.size()); // something like that

            for (Map.Entry<String, Gauge> gaugeEntry : gauges.entrySet()) {
                DemuxedKey key = new DemuxedKey(gaugeEntry.getKey());
                Gauge gauge = gaugeEntry.getValue();
                Object valueObj = gauge.getValue();
                if (valueObj == null) {
                    continue;
                }

                String valueStr = valueObj.toString();
View Full Code Here

Examples of com.codahale.metrics.annotation.Gauge

    @Override
    public <I> void hear(final TypeLiteral<I> literal, TypeEncounter<I> encounter) {
        Class<? super I> klass = literal.getRawType();
        for (final Method method : klass.getMethods()) {
            final Gauge annotation = method.getAnnotation(Gauge.class);
            if (annotation != null) {
                if (method.getParameterTypes().length == 0) {
                    final String metricName = determineName(annotation, klass, method);
                    encounter.register(new GaugeInjectionListener<I>(metricRegistry,
                        metricName,
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.Gauge

    options.setYellowRange(6, 12);
    options.setRedRange(12, 24);

    DataTable data = Showcase.getDailyActivities();
   
    widget = new Gauge(data, options);
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.Gauge

      public void run() {
        DataTable data = makeDataTable();
        Gauge.Options options = Gauge.Options.create();
        options.setSize(600, 200);
        RootPanel.get().add(new Gauge(data, options));
      }
    });
  }
View Full Code Here

Examples of com.google.gwt.visualization.client.visualizations.Gauge

        options.setRedRange(50, 100);
        options.setSize(600, 200);
        options.setWidth(600);
        options.setYellowRange(25, 50);
        DataTable data = makeDataTable();
        RootPanel.get().add(new Gauge(data, options));
      }
    });
  }
View Full Code Here

Examples of com.googlecode.gwt.charts.client.gauge.Gauge

        return ChartPackage.GAUGE;
    }

    @Override
    public Widget createVisualization() {
        chart = new Gauge();
        chart.draw(createTable(), createOptions());

        HTML titleHtml = new HTML();
        if (displayerSettings.isTitleVisible()) {
            titleHtml.setText(displayerSettings.getTitle());
View Full Code Here

Examples of com.yammer.metrics.core.Gauge

        JSONMetric gaugeJsonMetric = new JSONMetric();
        gaugeJsonMetric.setType("gauge");
        gaugeJsonMetric.setName("foo.bar.baz.gaugemetric" + Math.random());
        gaugeJsonMetric.setTimestamp((int) System.currentTimeMillis() / 1000);

        Gauge gauge = (Gauge) metricCatcher.createMetric(gaugeJsonMetric);
        metricCatcher.updateMetric(gauge, 100);
        assertEquals((long) 100, gauge.value());
        metricCatcher.updateMetric(gauge, 7);
        assertEquals((long) 7, gauge.value());
    }
View Full Code Here

Examples of javax.microedition.lcdui.Gauge

    final private void initializeBookmarkList() {
    //#ifdef DTEST
    System.gc();
    long beginMem = Runtime.getRuntime().freeMemory();
    //#endif
    Gauge gauge = new Gauge(ResourceProviderME.get("label.init.b"),
        false, m_settings.MAX_REGIONS, 0);
    int pl = m_loadForm.append(gauge);
        try {
            m_bookmarkList = new PromptList(this, "Bookmarks", List.IMPLICIT);
      updBookmarkList();
            m_bookmarkList.setCommandListener( this );
      //#ifdef DTEST
      System.gc();
      System.out.println("empty bookmarkList size=" + (beginMem - Runtime.getRuntime().freeMemory()));
      //#endif
           
            int i = 1;
           
            final boolean saveMemoryEnabled =
          m_appSettings.getSaveMemoryEnabled();
            m_rssFeeds = new RssFeedStore(saveMemoryEnabled);
      for (int ic = 1; ic < m_settings.MAX_REGIONS; ic++) {
        boolean stop = false;
        final String vers = m_settings.getStringProperty(ic,
            m_settings.SETTINGS_NAME, "");
        final boolean firstSettings =
           vers.equals(m_settings.FIRST_SETTINGS_VERS);
        final boolean itunesCapable = ((vers.length() > 0) &&
           (vers.compareTo(m_settings.ITUNES_CAPABLE_VERS) >= 0));
        final boolean latestSettings = vers.equals(
            m_settings.ENCODING_VERS);
        final boolean itemsEncoded =
          m_settings.getBooleanProperty(m_settings.ITEMS_ENCODED,
              true);
        final long storeDate = m_settings.getLongProperty(
            m_settings.STORE_DATE, 0L);
        final char feedSeparator =
          latestSettings ? CFEED_SEPARATOR : OLD_FEED_SEPARATOR;
        //#ifdef DLOGGING
        if (fineLoggable) {logger.fine("Settings region,vers,firstSettings,itunescapable,latestSettings,itemsEncoded,storeDate=" + ic + "," + vers + "," + firstSettings + "," + itunesCapable + "," + latestSettings + "," + itemsEncoded + "," + storeDate);}
        //#endif
        //#ifdef DTEST
        if (m_debugOutput) System.out.println("Settings region,vers,firstSettings,itunescapable,latestSettings,itemsEncoded,storeDate=" + ic + "," + vers + "," + firstSettings + "," + itunesCapable + "," + latestSettings + "," + itemsEncoded + "," + storeDate);
        //#endif
        String bms = m_settings.getStringProperty(ic, "bookmarks", "");
        //#ifdef DLOGGING
        if (fineLoggable) {logger.fine("bms.length()=" + bms.length());}
        //#endif
        // Save memory by setting bookmarks to "" now that
        // we will convert them to objects.
        m_settings.setStringProperty("bookmarks", "");
       
        if(bms.length()>0) {
          do{
           
            String part = "";
            int pos = bms.indexOf(feedSeparator);
            if(pos > 0) {
              part = bms.substring(0, pos);
            }
            bms = bms.substring(pos+1);
            if(part.length()>0) {
              RssStoreInfo rsi = null;
              //#ifdef DCOMPATIBILITY1
              RssFeed bm1 = new CompatibilityRssFeed1( part );
              RssItunesFeed bm = new RssItunesFeed( bm1 );
              //#elifdef DCOMPATIBILITY2
              RssFeed bm2 = new CompatibilityRssFeed2( part );
              RssItunesFeed bm = new RssItunesFeed( bm2 );
              //#elifdef DCOMPATIBILITY3
              RssItunesFeed bm2 =
                CompatibilityRssItunesFeed3.deserialize3(
                true, part );
              RssItunesFeed bm = new RssItunesFeed( bm2 );
              //#else
              RssItunesFeed bm = null;
              if (itunesCapable) {
                if (saveMemoryEnabled) {
                  rsi = RssItunesFeed.getStoreStringInfo(
                      true, false, part, itemsEncoded );
                } else {
                  bm = RssItunesFeed.deserialize(
                      itemsEncoded, part );
                }
              } else {
                bm = new RssItunesFeed(new RssFeed(
                      firstSettings, itemsEncoded, part ));
              }

              //#endif
              if((bm != null) && (bm.getName().length()>0)){
                final String fname = bm.getName();
                m_bookmarkList.append(fname,null);
                m_rssFeeds.put(fname, bm);
              } else {
                final String fname = rsi.getName();
                m_bookmarkList.append(fname,null);
                m_rssFeeds.put(fname,
                    rsi.getStoreString(), false);
              }
            }
            if( part.length()==0)
              stop = true;
          }while(!stop);
        }
        gauge.setValue(ic);
            }
      pl = -1;
      gauge.setValue(m_settings.MAX_REGIONS);
      //#ifdef DTEST
      System.gc();
      System.out.println("full bookmarkList size=" + (beginMem - Runtime.getRuntime().freeMemory()));
      //#endif
    } catch(CauseRecStoreException e) {
View Full Code Here

Examples of javax.microedition.lcdui.Gauge

          /* Updating all or modified feeds... */
          initializeLoadingFormRsc((m_refreshUpdFeeds ?
                "text.um.feed" : "text.ua.feed"),
              m_bookmarkList);
          /* Updating all (modified) feeds...*/
          Gauge gauge = new Gauge(ResourceProviderME.get(
                m_refreshAllFeeds ? "text.ua.feed" :
                "text.um.feed"),
              false, m_rssFeeds.size(), 0);
          int pl = m_loadForm.append(gauge);
                    try{
            boolean errFound = false;
                        final int maxItemCount =
                m_appSettings.getMaximumItemCountInFeed();
            final boolean convHtml =
              !m_appSettings.getHtmlEnabled();
                        Enumeration keyEnum = m_rssFeeds.keys();
            int ic = 1;
                        while(keyEnum.hasMoreElements()) {
                            final String fname =
                (String)keyEnum.nextElement();
                            RssItunesFeed feed =
                (RssItunesFeed)m_rssFeeds.get(fname);
                            try{
                                m_loadForm.appendMsg(fname + "...");
                                RssFeedParser parser = new RssFeedParser( feed );
                                parser.parseRssFeed( m_refreshUpdFeeds,
                    convHtml, maxItemCount);
                m_rssFeeds.put( fname, feed );
                                m_loadForm.appendMsg("ok\n");
                            } catch(CauseMemoryException ex) {
                throw ex;
                            } catch(Exception ex) {
                recordExcForm("Error parsing feed " +
                    feed.getName(), ex);
                errFound = true;
                            }
              gauge.setValue(ic);
              ic++;
                        }
            if (errFound) {
              setLoadingFinished(
                  /* Finished with one or more exceptions */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.