Inkscape
Vector Graphics Editor
framecheck.cpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
#include <fstream>
3
#include <iostream>
4
#include <mutex>
5
#include <boost/filesystem.hpp>
// Using boost::filesystem instead of std::filesystem due to broken C++17 on MacOS.
6
#include "
framecheck.h
"
7
namespace
fs = boost::filesystem;
8
9
namespace
Inkscape::FrameCheck
{
10
11
void
Event::write
()
12
{
13
static
std::mutex
mutex
;
14
static
auto
logfile = [] {
15
auto
path = fs::temp_directory_path() /
"framecheck.txt"
;
16
auto
mode
= std::ios_base::out | std::ios_base::app | std::ios_base::binary;
17
return
std::ofstream(path.string(),
mode
);
18
}();
19
20
auto
lock = std::lock_guard(
mutex
);
21
logfile <<
name
<<
' '
<<
start
<<
' '
<< g_get_monotonic_time() <<
' '
<<
subtype
<< std::endl;
22
}
23
24
}
// namespace Inkscape::FrameCheck
mutex
std::mutex mutex
Definition:
canvas.cpp:177
framecheck.h
Inkscape::FrameCheck
Definition:
framecheck.cpp:9
mode
int mode
Definition:
parametrics.cpp:20
Inkscape::FrameCheck::Event::start
gint64 start
Definition:
framecheck.h:12
Inkscape::FrameCheck::Event::subtype
int subtype
Definition:
framecheck.h:14
Inkscape::FrameCheck::Event::write
void write()
Definition:
framecheck.cpp:11
Inkscape::FrameCheck::Event::name
char const * name
Definition:
framecheck.h:13
src
ui
widget
canvas
framecheck.cpp
Generated on Sun Apr 7 2024 04:01:33 for Inkscape by
1.9.4