【问题标题】:How to Compile Google stressapptest for Android x86 Phone?如何为 Android x86 手机编译 Google 压力测试?
【发布时间】:2015-05-15 12:50:39
【问题描述】:

步骤(1)下载源代码

svn checkout http://stressapptest.googlecode.com/svn/trunk/ stressapptest

步骤(2)如何为Android x86手机编译上述代码?

我无法回答。

步骤(3)如何安装?

adb push stressapptest /data/local/tmp/
adb shell chmod 777  /data/local/tmp/stressapptest
adb shell /data/local/tmp/stressapptest

步骤(4)如何运行? 用户指南:https://code.google.com/p/stressapptest/wiki/UserGuide

命令行示例

./stressapptest -s 20 -M 256 -m 8 -C 8 -W # Allocate 256MB of memory and run 8 "warm copy" threads, and 8 cpu load threads. Exit after 20 seconds.

./stressapptest -f /tmp/file1 -f /tmp/file2 # Run 2 file IO threads, and autodetect memory size and core count to select allocated memory and memory copy threads.

问题是:如何为Android x86手机编译上述代码?

【问题讨论】:

    标签: android compilation android-ndk cross-compiling stress-testing


    【解决方案1】:

    使用 Android NDK

    您可以使用 NDK 编译可执行文件,您的 Android.mk 文件有一个包含 $(BUILD_EXECUTABLE) 语句。 (已包含在源文件中)。

    步骤

    1. 将整个源文件放入jni文件夹(不存在则创建)

    2. 制作 Aplication.mk 文件。

    APP_STL := stlport_static APP_ABI := x86 APP_PLATFORM := android-18

    1. 编辑stressapptest_config_android.h 文件

      • 取消注释#undef STRESSAPPTEST_CPU_I686 并将#undef 替换为#define。
      • 评论#define STRESSAPPTEST_CPU_ARMV7A
    2. 使用 ndk-build 命令编译 stressapptest 文件夹。
    3. 在 lib\x86 文件夹中,您将获得 stressapptest
    4. 下一步如问题所示

    【讨论】:

    • 工作中,可以在我的 x86 手机上运行。
    猜你喜欢
    • 2013-07-02
    • 1970-01-01
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-31
    • 2011-08-11
    相关资源
    最近更新 更多