7#include <gtest/gtest.h>
9#include "arccore/message_passing/Stat.h"
20 const Int64 message_size1 = 324;
21 const double message_time1 = 1.2;
22 const Int64 message_size2 = 1923;
23 const double message_time2 = 4.5;
27 ASSERT_EQ(stat1.name(), name1);
30 OneStat stat1(name1, message_size1, message_time1);
31 ASSERT_EQ(stat1.name(), name1);
32 ASSERT_EQ(stat1.nbMessage(), 0);
33 ASSERT_EQ(stat1.totalSize(), message_size1);
34 ASSERT_EQ(stat1.totalTime(), message_time1);
39 stat1.addMessage(message_size1, message_time1);
40 ASSERT_EQ(stat1.nbMessage(), 1);
41 ASSERT_EQ(stat1.totalSize(), message_size1);
42 ASSERT_EQ(stat1.totalTime(), message_time1);
43 ASSERT_EQ(stat1.cumulativeNbMessage(), 1);
44 ASSERT_EQ(stat1.cumulativeTotalSize(), message_size1);
45 ASSERT_EQ(stat1.cumulativeTotalTime(), message_time1);
47 stat1.resetCurrentStat();
49 ASSERT_EQ(stat1.nbMessage(), 0);
50 ASSERT_EQ(stat1.totalSize(), 0);
51 ASSERT_EQ(stat1.totalTime(), 0);
52 ASSERT_EQ(stat1.cumulativeNbMessage(), 1);
53 ASSERT_EQ(stat1.cumulativeTotalSize(), message_size1);
54 ASSERT_EQ(stat1.cumulativeTotalTime(), message_time1);
56 stat1.addMessage(message_size2, message_time2);
58 ASSERT_EQ(stat1.nbMessage(), 1);
59 ASSERT_EQ(stat1.totalSize(), message_size2);
60 ASSERT_EQ(stat1.totalTime(), message_time2);
61 ASSERT_EQ(stat1.cumulativeNbMessage(), 2);
62 ASSERT_EQ(stat1.cumulativeTotalSize(), message_size1 + message_size2);
63 ASSERT_EQ(stat1.cumulativeTotalTime(), message_time1 + message_time2);
65 stat1.print(std::cout);
71 stat1.setNbMessage(3);
72 ASSERT_EQ(stat1.nbMessage(), 3);
74 stat1.setTotalSize(message_size1);
75 ASSERT_EQ(stat1.totalSize(), message_size1);
77 stat1.setTotalTime(message_time1);
78 ASSERT_EQ(stat1.totalTime(), message_time1);
80 stat1.setCumulativeNbMessage(25);
81 ASSERT_EQ(stat1.cumulativeNbMessage(), 25);
83 stat1.setCumulativeTotalSize(message_size2);
84 ASSERT_EQ(stat1.cumulativeTotalSize(), message_size2);
86 stat1.setCumulativeTotalTime(message_time2);
87 ASSERT_EQ(stat1.cumulativeTotalTime(), message_time2);
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Statistique sur un message.
Chaîne de caractères unicode.
Espace de nommage contenant les types et déclarations qui gèrent le mécanisme de parallélisme par éch...
Espace de nom de Arccore.