Package edu.brown.statistics

Examples of edu.brown.statistics.WorkloadStatistics


            ((Workload) workload).load(workload_file, catalog_db, filter);
           
            File stats_file = this.getStatsFile(type);
            assertNotNull(stats_file);
            assert(stats_file.exists());
            stats = new WorkloadStatistics(catalog_db);
            try {
                stats.load(stats_file, catalog_db);
            } catch (AssertionError ex) {
                System.err.println("Failed to load " + stats_file.getAbsolutePath());
                throw ex;
View Full Code Here


            VoltTable voltTable = (VoltTable)args[ctr];
           
            // Workload Initialization
            if (this.stats_catalog_db == null) {
                this.stats_catalog_db = (Database)catalog_proc.getParent();
                this.stats = new WorkloadStatistics(this.stats_catalog_db);
                for (Table catalog_tbl : this.stats_catalog_db.getTables()) {
                    this.stats.getTableStatistics(catalog_tbl).preprocess(this.stats_catalog_db);
                } // FOR
            }
            final Table catalog_tbl = CatalogUtil.getCatalogTable(stats_catalog_db, voltTable);
View Full Code Here

        } // FOR
       
        if (trace.val)
            LOG.trace(String.format("Creating WorkloadStatistics for %d tables [totalRows=%d, totalBytes=%d",
                                    m_tableStatsData.size(), m_tableTuples.getSampleCount(), m_tableBytes.getSampleCount()));
        WorkloadStatistics stats = new WorkloadStatistics(catalogContext.database);
        stats.apply(m_tableStatsData);
        return (stats);
    }
View Full Code Here

   
    protected final void invokeStopCallback() {
        // If we were generating stats, then get the final WorkloadStatistics object
        // and write it out to a file for them to use
        if (m_tableStats) {
            WorkloadStatistics stats = this.generateWorkloadStatistics();
            assert(stats != null);
           
            if (m_tableStatsDir.exists() == false) m_tableStatsDir.mkdirs();
            File path = new File(m_tableStatsDir.getAbsolutePath() + "/" + this.getProjectName() + ".stats");
            LOG.info("Writing table statistics data to '" + path + "'");
            try {
                stats.save(path);
            } catch (IOException ex) {
                throw new RuntimeException("Failed to save table statistics to '" + path + "'", ex);
            }
        }
       
View Full Code Here

     *
     * @param catalogContext
     * @param workload
     */
    public DesignerInfo(CatalogContext catalogContext, Workload workload) {
        this(catalogContext, workload, new WorkloadStatistics(catalogContext.database));
    }
View Full Code Here

        IOFileFilter filter = new IOFileFilter("Workload Stats", "stats");
        Pair<WorkloadStatistics, File> ret = null;
        try {
            String path = showLoadDialog("Open Workload Statistics File", ".", filter);
            if (path != null) {
                WorkloadStatistics new_stats = new WorkloadStatistics(args.catalog_db);
                File f = new File(path);
                new_stats.load(f, args.catalog_db);
                ret = new Pair<WorkloadStatistics, File>(new_stats, f);
            }
        } catch (Exception ex) {
            ex.printStackTrace();
            showErrorDialog("Failed to open workload stats file", ex.getMessage());
View Full Code Here

       
        // Load up the stats file.
        // Super hack! Walk back the directories and find out workload directory
        if (stats == null) {
            File stats_file = this.getStatsFile(ProjectType.TM1);
            stats = new WorkloadStatistics(catalog_db);
            stats.load(stats_file, catalog_db);
        }
       
        hasher = new DefaultHasher(catalogContext, NUM_PARTITIONS);
        m_estimator = new MemoryEstimator(stats, hasher);
View Full Code Here

            ((Workload)singlep_workload).load(f, catalog_db, single_filter);
            assert(singlep_workload.getTransactionCount() > 0);
           
            // Workload Statistics
            f = this.getStatsFile(ProjectType.TM1);
            stats = new WorkloadStatistics(catalog_db);
            stats.load(f, catalog_db);
        }
        assertNotNull(multip_workload);
        assertNotNull(singlep_workload);
        assertNotNull(stats);
View Full Code Here

TOP

Related Classes of edu.brown.statistics.WorkloadStatistics

Copyright © 2018 www.massapicom. 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.