<commit_before><?php
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $Id$
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
// Return a tree of coverage directory with the number of line covered
// and not covered
include_once('api.php');

class BuildAPI extends CDashAPI
{
  
  /** Return the coverage per directory */
  private function ListDefects()
    { 
    include_once('../cdash/common.php');  
    if(!isset($this->Parameters['project']))  
      {
      echo "Project not set";
      exit();
      }
      
    $projectid = get_project_id($this->Parameters['project']);
    if(!is_numeric($projectid))
      {
      echo "Project not found";
      exit();
      }

    $builds = array();
    $query = pdo_query("SELECT YEAR(starttime) AS y ,MONTH(starttime) AS m,DAY(starttime) AS d,
                AVG(builderrors),AVG(buildwarnings),AVG(testnotrun),AVG(testfailed)
                FROM build WHERE projectid=".$projectid." GROUP BY YEAR(starttime),MONTH(starttime),DAY(starttime) ORDER BY YEAR(starttime),MONTH(starttime),DAY(starttime) ASC LIMIT 1000"); // limit the request
    echo pdo_error();
     <commit_msg>BUG: Should be average over time<commit_after><?php
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $Id$
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
// Return a tree of coverage directory with the number of line covered
// and not covered
include_once('api.php');

class BuildAPI extends CDashAPI
{
  
  /** Return the coverage per directory */
  private function ListDefects()
    { 
    include_once('../cdash/common.php');  
    if(!isset($this->Parameters['project']))  
      {
      echo "Project not set";
      exit();
      }
      
    $projectid = get_project_id($this->Parameters['project']);
    if(!is_numeric($projectid))
      {
      echo "Project not found";
      exit();
      }

    $builds = array();
    $query = pdo_query("SELECT YEAR(starttime) AS y ,MONTH(starttime) AS m,DAY(starttime) AS d,
                AVG(builderrors) AS builderrors,AVG(buildwarnings) AS buildwarnings,
                AVG(testnotrun) AS testnotrun,AVG(testfailed) AS testfailed
                FROM build WHERE projectid=".$projectid." GROUP BY YEAR(starttime),MONTH(starttime),DAY(starttime) ORDER BY YEAR(starttime),MONTH(starttime),DAY(starttime) ASC LIMIT 1000"); // limit the request
    echo pdo_error();
     
{'fraction_non_alphanumeric': 0.1876463700234192, 'fraction_numerical': 0.00468384074941452, 'mean_word_length': 3.431906614785992, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4355424', 'n_tokens_mistral': 965, 'n_tokens_neox': 911, 'n_words': 274}