lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-1774) In a benchmark alg, if you use a log.step thats higher than the number of docs you add, whacky high numbers are logged for doc adds
Date Mon, 03 Aug 2009 13:57:14 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738346#action_12738346
] 

Shai Erera edited comment on LUCENE-1774 at 8/3/09 6:55 AM:
------------------------------------------------------------

I like that idea. DeleteDocTask today defines a "delete.log.step", but it's defined only for
that task. There is no "search.log.step" for example. 

Having a pattern like log.step.<Task Class name> will allow us to support it in PerfTask
by doing something like:
{code}
    logStep = config.get("log.step", DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

    // Check if a log step for the current task is defined
    logStep = config.get("log.step." + getClass().getSimpleName(), DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

{code}

And so we can support a log.step for any task, irregardless of whether that task included
support for it or not. And we can remove the delete.log.step param (new in 2.9 so no problem).
Note that the above code is 1.5 dependent, but I can make it 1.4 compliant w/ a TODO to switch
to getSimpleName() in 1.5.

What do you think? Shall I open an issue for that? Or can you reopen that issue and I'll prepare
a patch?

      was (Author: shaie):
    I like that idea. DeleteDocTask today defines a "delete.log.step", but it's defined only
for that task. There is no "search.log.step" for example. 

Having a pattern like log.step.<Task Class name> will allow us to support it in PerfTask
by doing something like:
{code}
    logStep = config.get("log.step", DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

    // Check if a log step for the current task is defined
    logStep = config.get("log.step" + getClass().getSimpleName(), DEFAULT_LOG_STEP);
    if (logStep <= 0) {
      logStep = Integer.MAX_VALUE;
    }

{code}

And so we can support a log.step for any task, irregardless of whether that task included
support for it or not. And we can remove the delete.log.step param (new in 2.9 so no problem).
Note that the above code is 1.5 dependent, but I can make it 1.4 compliant w/ a TODO to switch
to getSimpleName() in 1.5.

What do you think? Shall I open an issue for that? Or can you reopen that issue and I'll prepare
a patch?
  
> In a benchmark alg, if you use a log.step thats higher than the number of docs you add,
whacky high numbers are logged for doc adds
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1774
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1774
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/benchmark
>            Reporter: Mark Miller
>            Priority: Trivial
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message