LCOV - code coverage report
Current view: top level - matcher - remotesubmatch.cc (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core 7028d852e609 Lines: 8 8 100.0 %
Date: 2019-02-17 14:59:59 Functions: 2 2 100.0 %
Branches: 3 6 50.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file remotesubmatch.cc
       2                 :            :  *  @brief SubMatch class for a remote database.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2006,2007,2009,2010,2011,2014,2015,2018 Olly Betts
       5                 :            :  * Copyright (C) 2007,2008 Lemur Consulting Ltd
       6                 :            :  *
       7                 :            :  * This program is free software; you can redistribute it and/or modify
       8                 :            :  * it under the terms of the GNU General Public License as published by
       9                 :            :  * the Free Software Foundation; either version 2 of the License, or
      10                 :            :  * (at your option) any later version.
      11                 :            :  *
      12                 :            :  * This program is distributed in the hope that it will be useful,
      13                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15                 :            :  * GNU General Public License for more details.
      16                 :            :  *
      17                 :            :  * You should have received a copy of the GNU General Public License
      18                 :            :  * along with this program; if not, write to the Free Software
      19                 :            :  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
      20                 :            :  */
      21                 :            : 
      22                 :            : #include <config.h>
      23                 :            : 
      24                 :            : #include "remotesubmatch.h"
      25                 :            : 
      26                 :            : #include "debuglog.h"
      27                 :            : #include "backends/remote/remote-database.h"
      28                 :            : #include "weight/weightinternal.h"
      29                 :            : 
      30                 :            : using namespace std;
      31                 :            : 
      32                 :            : void
      33                 :      10362 : RemoteSubMatch::prepare_match(Xapian::Weight::Internal& total_stats)
      34                 :            : {
      35                 :            :     LOGCALL_VOID(MATCH, "RemoteSubMatch::prepare_match", total_stats);
      36         [ +  - ]:      10362 :     Xapian::Weight::Internal remote_stats;
      37         [ +  - ]:      10362 :     db->get_remote_stats(remote_stats);
      38         [ +  - ]:      10362 :     total_stats += remote_stats;
      39                 :      10362 : }
      40                 :            : 
      41                 :            : void
      42                 :      10362 : RemoteSubMatch::start_match(Xapian::doccount first,
      43                 :            :                             Xapian::doccount maxitems,
      44                 :            :                             Xapian::doccount check_at_least,
      45                 :            :                             Xapian::Weight::Internal & total_stats)
      46                 :            : {
      47                 :            :     LOGCALL_VOID(MATCH, "RemoteSubMatch::start_match", first | maxitems | check_at_least | total_stats);
      48                 :      10362 :     db->send_global_stats(first, maxitems, check_at_least, total_stats);
      49                 :      10362 : }

Generated by: LCOV version 1.11