<commit_before>/** 
 * PRIVATE HEADER
 *
 * Descriptions of internal data structures used to store data in memory mappaed files.
 * All data are in host byte order.
 *
 * Copyright (c) 2013 <NAME> <<EMAIL>>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 */

#pragma once
#include <cstdint>
#include "akumuli.h"
#include "util.h"


namespace Akumuli {

struct EntryOffset {
    uint64_t offset;

    EntryOffset();
    EntryOffset(uint32_t offset);
    EntryOffset(const EntryOffset& other);
    EntryOffset& operator = (const EntryOffset& other);
};


/** Timestamp. Can be treated as
 *  single 64-bit value or two
 *  consequtive 32-bit values.
 */
union TimeStamp {
    /** number of microseconds since 00:00:00 january 1, 1970 UTC */
    uint64_t precise;
    // Maybe I should remove this?
    struct t {
        uint32_t object;
        uint32_t server;
    };

    /** UTC timestamp of the current instant */
    static TimeStamp utc_now() noexcept;
};

/** String memory layout
  */<commit_msg>page.h edited online with Bitbucket<commit_after>/** 
 * PRIVATE HEADER
 *
 * Descriptions of internal data structures used to store data in memory mappaed files.
 * All data are in host byte order.
 *
 * Copyright (c) 2013 <NAME> <<EMAIL>>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 */

#pragma once
#include <cstdint>
#include "akumuli.h"
#include "util.h"


namespace Akumuli {

struct EntryOffset {
    uint64_t offset;

    EntryOffset();
    EntryOffset(uint64_t offset);
    EntryOffset(const EntryOffset& other);
    EntryOffset& operator = (const EntryOffset& other);
};


/** Timestamp. Can be treated as
 *  single 64-bit value or two
 *  consequtive 32-bit values.
 */
union TimeStamp {
    /** number of microseconds since 00:00:00 january 1, 1970 UTC */
    uint64_t precise;
    // Maybe I should remove this?
    struct t {
        uint32_t object;
        uint32_t server;
    };

    /** UTC timestamp of the current instant */
    static TimeStamp utc_now() noexcept;
};

/** String memory layout
  */
{'fraction_non_alphanumeric': 0.09288052373158756, 'fraction_numerical': 0.024549918166939442, 'mean_word_length': 3.1866438356164384, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3252911', 'n_tokens_mistral': 774, 'n_tokens_neox': 713, 'n_words': 292}