<commit_before>/****************************************************************/
/*               DO NOT MODIFY THIS HEADER                      */
/* MOOSE - Multiphysics Object Oriented Simulation Environment  */
/*                                                              */
/*           (c) 2010 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

#include "MemDataTest.h"

// Moose includes
#include "MemData.h"

// This macro declares a static variable whose construction
// causes a test suite factory to be inserted in a global registry
// of such factories.
CPPUNIT_TEST_SUITE_REGISTRATION( MemDataTest );


void MemDataTest::test()
{
  MemData mem_data;

  // Begin logging
  mem_data.start();

  // Allocate memory
  unsigned array_size = 1024*1024; // 4 bytes/int * 1M = 4M
  int* dummy_memory = new int[array_size];

  // Just calling "new" alone does not register any change in the
  // operating system...you actually have to touch all the memory
  // you asked for.
  for (unsigned i=0; i<array_size; ++i)
    dummy_memory[i] = i;

  // Stop logging<commit_msg>Fixing moose_unit (#1319)<commit_after>/****************************************************************/
/*               DO NOT MODIFY THIS HEADER                      */
/* MOOSE - Multiphysics Object Oriented Simulation Environment  */
/*                                                              */
/*           (c) 2010 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

#include "MemDataTest.h"

// Moose includes
#include "MemData.h"
// libMesh
#include "libmesh_common.h"

// This macro declares a static variable whose construction
// causes a test suite factory to be inserted in a global registry
// of such factories.
CPPUNIT_TEST_SUITE_REGISTRATION( MemDataTest );


void MemDataTest::test()
{
  MemData mem_data;

  // Begin logging
  mem_data.start();

  // Allocate memory
  unsigned array_size = 1024*1024; // 4 bytes/int * 1M = 4M
  int* dummy_memory = new int[array_size];

  // Just calling "new" alone does not register any change in the
  // operating system...you actually have to touch all the memory
  // you asked for.
  for (unsigned i=0; i<array_size; ++i)
    dummy_memory[i] = i;

  // Stop logging
{'fraction_non_alphanumeric': 0.16274809160305342, 'fraction_numerical': 0.01648854961832061, 'mean_word_length': 1.5395348837209302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4475620', 'n_tokens_mistral': 812, 'n_tokens_neox': 735, 'n_words': 256}