luojilab / datareporter Goto Github PK
View Code? Open in Web Editor NEWReal-time data reporting system based on mobile platform
License: MIT License
Real-time data reporting system based on mobile platform
License: MIT License
关于使用有几点疑惑:
看了demo的代码,还是有点疑惑,
一般以为使用是这样的,启动统一初始化DataReporter(相关设置)、在各处需要上传的时候添加到上报队列、上报(处理回调)
疑问在第二点添加上报数据哪里,初始化的时候把DataReporter设置为全局对象,添加直接拿到对象添加吗?
发送速度跟不上产生数据的速度,这个时候内存一直在涨,长时间下来有可能爆内存。
请教下这两者的区别?
No implementation found for long com.iget.datareporter.DataReporter.makeReporter(java.lang.String, java.lang.String, java.lang.String, com.iget.datareporter.IReport) (tried Java_com_iget_datareporter_DataReporter_makeReporter and Java_com_iget_datareporter_DataReporter_makeReporter__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Lcom_iget_datareporter_IReport_2)
gradle:
minSdkVersion 21
targetSdkVersion 30
versionCode 23
versionName "1.1.6"
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
packagingOptions {
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}
使用的版本: api 'com.luojilab.component:datareporter:1.4.4'
使用Kotlin代码实例化mDataReporter的时候报错。
使用这行代码实例化:
mDataReporter = DataReporter.makeDataReporter(uuid, applicationContext.filesDir.path, key, reportImp)
报错信息如下:
java.lang.UnsatisfiedLinkError: No implementation found for long com.iget.datareporter.DataReporter.makeReporter(java.lang.String, java.lang.String, java.lang.String, com.iget.datareporter.IReport) (tried Java_com_iget_datareporter_DataReporter_makeReporter and Java_com_iget_datareporter_DataReporter_makeReporter__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Lcom_iget_datareporter_IReport_2) at com.iget.datareporter.DataReporter.makeReporter(Native Method) at com.iget.datareporter.DataReporter.<init>(DataReporter.java:82) at com.iget.datareporter.DataReporter.makeDataReporter(DataReporter.java:37)
gradle是这样引入的:
api 'com.luojilab.component:datareporter:1.3.8'
未做代码混淆
我push了很多条数据,却一直不会走到upload回调,不知道是什么情况?和我这边是多进程APP有关吗,reporter的实例化是放在Application的onCreate()中做的
从用户反馈的文件分析看,初始的一段时间上报都是正常的,APP连续使用超过二十个小时后,只有push记录,没有upload记录,怀疑是线程挂了。
目前版本1.3.9,尚未升级到最新版本。
这是一个已知问题吗,当前最新版本里有修复这个问题吗?
因项目仅支持armeabi下so,请问armeabi-v7a 下so可以放入armeabi下吗? 或者提供下armeabi so
谢谢
1.3.3 和 1.3.4版本的用户麻烦尽快升级1.3.5
1.3.3和 1.3.4 为了修复 reweaken不及时问题,有概率性造成数据上报顺序不正确 和 上报数据不及时问题。 1.3.5已经修复该问题。
麻烦尽快升级1.3.5
1.3.5接口进行了重新封装,功能不变,只是把native指针封装起来,不再对外暴漏,请知悉。
当本地多条数据上传失败后本地数据会重复
这个方法是转换成STring
private String getDataToString(byte[][] data) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
for (int i = 0; i < data.length; i++) {
if (data[i] != null) {
out.write(data[i]);
}
}
out.close();
} catch (Exception e) {
}
多条数据上传失败后,数据重复
数据监听_DataReporter获取地址: /data/user/0/com.iflytek.apm/files/tombstones/tombstone_00001662382446920000_1.0__com.iflytek.apm.java.xcrash/data/user/0/com.iflytek.apm/files/tombstones/tombstone_00001662382449409000_1.0__com.iflytek.apm.java.xcrash/data/user/0/com.iflytek.apm/files/tombstones/tombstone_00001662382452176000_1.0__com.iflytek.apm.java.xcrash/data/user/0/com.iflytek.apm/files/tombstones/Martix_exception1662382457344.txt/data/user/0/com.iflytek.apm/files/tombstones/Martix_exception1662382460344.txt
正常数据为:/data/user/0/com.iflytek.apm/files/tombstones/Martix_exception1662383143151.txt
如题,push了1000条,实际上在ReportImp当中uplaod只运行了两百多次,七百多条数据丢了
SIGSEGV(SEGV_MAPERR)
#00 pc 0005f48c /apex/com.android.runtime/lib/bionic/libc.so (__memcpy_base_a55+180) [armeabi-v7a]
#1 pc 000a81d7 /apex/com.android.runtime/lib/bionic/libc.so (fread_unlocked+102) [armeabi-v7a]
#2 pc 000a813f /apex/com.android.runtime/lib/bionic/libc.so (fread+38) [armeabi-v7a]
#3 pc 0002b3fc libdata-reporter.so DecodeData (/Users/lzt/Downloads/DataReporter-master/src/core/base/MiniPBCoder.cpp:193) [armeabi-v7a]
#4 pc 0002ae9c libdata-reporter.so DecodeItem (/Users/lzt/Downloads/DataReporter-master/src/core/base/MiniPBCoder.cpp:31) [armeabi-v7a]
#5 pc 0003cc5c libdata-reporter.so ReadData (/Users/lzt/Downloads/DataReporter-master/src/core/reporter/FileInputStream.cpp:68) [armeabi-v7a]
#6 pc 00030c2c libdata-reporter.so ReadFromFile (/Users/lzt/Downloads/DataReporter-master/src/core/reporter/DataProvider.cpp:114) [armeabi-v7a]
#7 pc 0002f398 libdata-reporter.so ReadData (/Users/lzt/Downloads/DataReporter-master/src/core/reporter/DataProvider.cpp:58) [armeabi-v7a]
#8 pc 0003f238 libdata-reporter.so Report (/Users/lzt/Downloads/DataReporter-master/src/core/reporter/Reporter.cpp:203) [armeabi-v7a]
#9 pc 0004a750 libdata-reporter.so __call<std::__ndk1::__bind<void (future::Reporter::*)(), future::Reporter *> &> (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:2227 [Inline: __mu<future::Reporter , std::__ndk1::tuple<> >]) [armeabi-v7a]
#10 pc 0004a4a8 libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1562) [armeabi-v7a]
#11 pc 0005740c libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1924) [armeabi-v7a]
#12 pc 00058194 libdata-reporter.so operator() (/Users/lzt/Downloads/DataReporter-master/src/core/reporter/Reporter.cpp:424) [armeabi-v7a]
#13 pc 00058138 libdata-reporter.so __call<(lambda at /Users/lzt/Downloads/DataReporter-master/src/core/reporter/Reporter.cpp:422:26) &> (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/__functional_base:349 [Inline: forward<(lambda at /Users/lzt/Downloads/DataReporter-master/src/core/reporter/Reporter.cpp:422:26) &>]) [armeabi-v7a]
#14 pc 00057eec libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1562) [armeabi-v7a]
#15 pc 0005740c libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1924) [armeabi-v7a]
#16 pc 000624f4 libdata-reporter.so run (/Users/lzt/Downloads/DataReporter-master/src/core/thread/HandlerThread.cpp:89) [armeabi-v7a]
#17 pc 00064ee8 libdata-reporter.so __call<std::__ndk1::__bind<void (WTF::HandlerThread::)(), WTF::HandlerThread *> &> (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:2227 [Inline: __mu<WTF::HandlerThread , std::__ndk1::tuple<> >]) [armeabi-v7a]
#18 pc 00064c60 libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1562) [armeabi-v7a]
#19 pc 0005740c libdata-reporter.so operator() (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/functional:1924) [armeabi-v7a]
#20 pc 00065060 libdata-reporter.so __thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_deletestd::__ndk1::__thread_struct >, std::__ndk1::function<void ()> > > (/Users/lzt/android-ndk-r16b/sources/cxx-stl/llvm-libc++/include/thread:352 [Inline: __thread_execute<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_deletestd::__ndk1::__thread_struct >, std::__ndk1::function<void ()>>]) [armeabi-v7a]
#21 pc 000ac4dd /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void)+20) [armeabi-v7a]
#22 pc 00062989 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) [armeabi-v7a]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.