Home
last modified time | relevance | path

Searched refs:totalbuffer (Results 1 – 7 of 7) sorted by relevance

/developtools/profiler/device/plugins/memory_plugin/test/unittest/
Dbuffer_splitter_unittest.cpp53 BufferSplitter totalbuffer(text, readsize);
54 EXPECT_EQ(nullptr, totalbuffer.CurLine());
55 EXPECT_EQ((size_t)0, totalbuffer.CurLineSize());
56 EXPECT_EQ(nullptr, totalbuffer.CurWord());
57 EXPECT_EQ((size_t)0, totalbuffer.CurWordSize());
69 BufferSplitter totalbuffer(text, readsize);
70 EXPECT_EQ(nullptr, totalbuffer.CurLine());
71 EXPECT_EQ((size_t)0, totalbuffer.CurLineSize());
72 EXPECT_EQ(nullptr, totalbuffer.CurWord());
73 EXPECT_EQ((size_t)0, totalbuffer.CurWordSize());
[all …]
/developtools/profiler/device/plugins/diskio_plugin/src/
Ddiskio_data_plugin.cpp165 BufferSplitter totalbuffer(const_cast<char*>(pFile), fileLen + 1); in SetDiskioData()
170 totalbuffer.NextWord(' '); in SetDiskioData()
171 std::string curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in SetDiskioData()
173 if (!totalbuffer.NextWord('\n')) { in SetDiskioData()
175 __func__, totalbuffer.CurWord()); in SetDiskioData()
178 curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in SetDiskioData()
181 if (!totalbuffer.NextWord('\n')) { in SetDiskioData()
183 __func__, totalbuffer.CurWord()); in SetDiskioData()
186 curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in SetDiskioData()
189 } while (totalbuffer.NextLine()); in SetDiskioData()
/developtools/profiler/device/plugins/process_plugin/src/
Dprocess_data_plugin.cpp197 BufferSplitter totalbuffer(const_cast<const char*>(pFile), fileLen + 1); in WriteProcess()
200 totalbuffer.NextWord(':'); in WriteProcess()
201 if (!totalbuffer.CurWord()) { in WriteProcess()
205 if (BufnCmp(totalbuffer.CurWord(), totalbuffer.CurWordSize(), "Name", strlen("Name"))) { in WriteProcess()
206 totalbuffer.NextWord('\n'); in WriteProcess()
207 if (!totalbuffer.CurWord()) { in WriteProcess()
210 processinfo.set_name(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in WriteProcess()
211 … } else if (BufnCmp(totalbuffer.CurWord(), totalbuffer.CurWordSize(), "Pid", strlen("Pid"))) { in WriteProcess()
212 totalbuffer.NextWord('\n'); in WriteProcess()
213 if (!totalbuffer.CurWord()) { in WriteProcess()
[all …]
/developtools/profiler/device/plugins/cpu_plugin/src/
Dcpu_data_plugin.cpp261 BufferSplitter totalbuffer(const_cast<char*>(pFile), fileLen + 1); in WriteProcessCpuUsage()
264 totalbuffer.NextWord(' '); in WriteProcessCpuUsage()
265 if (!totalbuffer.CurWord()) { in WriteProcessCpuUsage()
272 std::string curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in WriteProcessCpuUsage()
402 BufferSplitter totalbuffer(const_cast<char*>(pFile), fileLen + 1); in WriteSystemCpuUsage()
407 totalbuffer.NextWord(' '); in WriteSystemCpuUsage()
408 if (!totalbuffer.CurWord() || strncmp(totalbuffer.CurWord(), "cpu", cpuLength) != 0) { in WriteSystemCpuUsage()
413 if (!totalbuffer.CurWord()) { in WriteSystemCpuUsage()
416 std::string curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in WriteSystemCpuUsage()
418 totalbuffer.NextWord(' '); in WriteSystemCpuUsage()
[all …]
/developtools/profiler/device/plugins/network_plugin/src/
Dnetwork_plugin.cpp226 BufferSplitter totalbuffer((const char*)buffer_.get(), rsize + 1); in ReadTxRxBytes() local
231 while (totalbuffer.NextWord(' ')) { in ReadTxRxBytes()
233 if (totalbuffer.CurWord() == nullptr) { in ReadTxRxBytes()
236 if (index == IFACE_INDEX && !strncmp(totalbuffer.CurWord(), "lo", strlen("lo"))) { in ReadTxRxBytes()
240 … strncpy_s(tmp, sizeof(tmp), totalbuffer.CurWord(), totalbuffer.CurWordSize()) == EOK) { in ReadTxRxBytes()
243 uint64_t value = static_cast<uint64_t>(strtoull(totalbuffer.CurWord(), &end, DEC_BASE)); in ReadTxRxBytes()
260 } while (totalbuffer.NextLine()); in ReadTxRxBytes()
294 BufferSplitter totalbuffer((const char*)buffer_.get(), rsize + 1); in ReadSystemTxRxBytes() local
299 while (totalbuffer.NextWord(' ')) { in ReadSystemTxRxBytes()
301 if (totalbuffer.CurWord() == nullptr) { in ReadSystemTxRxBytes()
[all …]
/developtools/profiler/device/plugins/native_hook/test/unittest/
Dcheck_hook_data_test.cpp410 bool Getdata(BufferSplitter& totalbuffer, std::vector<std::string>& hookVec, char delimiter) in Getdata() argument
412 totalbuffer.NextWord(delimiter); in Getdata()
413 if (!totalbuffer.CurWord()) { in Getdata()
416 std::string curWord = std::string(totalbuffer.CurWord(), totalbuffer.CurWordSize()); in Getdata()
485 BufferSplitter totalbuffer(const_cast<char*>((char*)g_buffer.get()), ret + 1);
493 Getdata(totalbuffer, hookVec, delimiter);
497 EXPECT_TRUE(Getdata(totalbuffer, hookVec, delimiter));
500 EXPECT_TRUE(Getdata(totalbuffer, hookVec, delimiter));
508 EXPECT_TRUE(Getdata(totalbuffer, hookVec, delimiter));
511 EXPECT_TRUE(Getdata(totalbuffer, hookVec, delimiter));
[all …]
/developtools/profiler/device/plugins/memory_plugin/src/
Dmemory_data_plugin.cpp210 BufferSplitter totalbuffer((const char*)buffer_.get(), readsize); in WriteMeminfo() local
213 if (!totalbuffer.NextWord(':')) { in WriteMeminfo()
216 const_cast<char *>(totalbuffer.CurWord())[totalbuffer.CurWordSize()] = '\0'; in WriteMeminfo()
217 auto it = meminfoCounters_.find(totalbuffer.CurWord()); in WriteMeminfo()
223 if (!totalbuffer.NextWord(' ')) { in WriteMeminfo()
226 auto value = static_cast<uint64_t>(strtoll(totalbuffer.CurWord(), nullptr, DEC_BASE)); in WriteMeminfo()
231 } while (totalbuffer.NextLine()); in WriteMeminfo()
269 BufferSplitter totalbuffer((const char*)buffer_.get(), readsize); in WriteVmstat() local
272 if (!totalbuffer.NextWord(' ')) { in WriteVmstat()
275 const_cast<char *>(totalbuffer.CurWord())[totalbuffer.CurWordSize()] = '\0'; in WriteVmstat()
[all …]