Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9798F85A2 for ; Tue, 30 Aug 2011 22:01:34 +0000 (UTC) Received: (qmail 78451 invoked by uid 500); 30 Aug 2011 22:01:33 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 78298 invoked by uid 500); 30 Aug 2011 22:01:33 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 78271 invoked by uid 99); 30 Aug 2011 22:01:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 22:01:32 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 22:01:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AB08A41608 for ; Tue, 30 Aug 2011 22:01:10 +0000 (UTC) Date: Tue, 30 Aug 2011 22:01:10 +0000 (UTC) From: "Filipe Manana (JIRA)" To: dev@couchdb.apache.org Message-ID: <1111931042.419.1314741670697.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1179756654.8810.1314730658179.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COUCHDB-1266) Add stats field to _active_tasks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094143#comment-13094143 ] Filipe Manana commented on COUCHDB-1266: ---------------------------------------- Thanks Paul and Adam, I agree the current status text field could go away, as it can be built from this stats property. However I would be more confortable doing this change for 2.0 for e.g. I like to see this in Futon. I agree it currently doesn't look like very formatted and so on, so it could get polished by someone more confortable with Futon/CSS/HTML. About the progress, right now it's trivial to compute (and it's more of an estimation, without a very high degree of accuracy). But i prefer to leave it's computation to the tasks and not the applications. This is because how it's calculated can change in the future as the implementation of the tasks (compaction, indexing, replication) evolve. I agree that with setelement and #record.fieldname tricks some code size can be reduced. > Add stats field to _active_tasks > -------------------------------- > > Key: COUCHDB-1266 > URL: https://issues.apache.org/jira/browse/COUCHDB-1266 > Project: CouchDB > Issue Type: Improvement > Reporter: Filipe Manana > Assignee: Filipe Manana > Fix For: 1.2 > > > This proposal is simply to add a "stats" field to the _active_tasks results. This field can be an arbitrary JSON value and each task can set it to whatever is appropriate for it.The following patch also defines some basic stats for the existing tasks: > 1) database compaction - # changes done, total changes, # of revisions copied, # of attachments copied and progress (an integer percentage, same as what is exposed in the existing text field "status"); > 2) view compaction - # of ids copied, total number of ids, # of kvs copied, total number of kvs and progress > 3) view indexing - # changes done, total changes, # inserted kvs, # deleted kvs, progress > 4) replication - # missing revisions checked, # missing revisions found, # docs read, # docs written, # doc write failures, source seq number, checkpointed source seq number, progress. > A screenshot of Futon with 3 different tasks: > http://dl.dropbox.com/u/25067962/active_tasks_stats.png > Patch at: > https://github.com/fdmanana/couchdb/compare/task_stats.diff -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira