在eclipse中运行Twitter Cassowary示例

时间:2015-02-10 06:49:42

标签: eclipse scala twitter github

我已将 Twitter Cassovary 导入 Eclipse 表格 Git Hub ,但不知道如何运行这些示例。请告知我是新手日食以及斯卡拉

1 个答案:

答案 0 :(得分:0)

我导入了项目,打开了一个基准测试(cassovary-benchmarks / src / main / java / GraphGenerationBenchmarks)并使用了Run as-> Scala应用程序。

您也可以从命令行执行此操作。在主项目目录中启动sbt,选择子项目cassovary-benchmarkmarks然后使用run。您将被问到要运行哪个基准。

➜  twitter-cassovary git:(master) ✗ ls
README.md            cassovary-examples   project
cassovary-benchmarks cassovary-server     sbt
cassovary-core       lib_managed          target
➜  twitter-cassovary git:(master) ✗ sbt
Loading /Users/szymon/bin/sbt-launch-lib.bash
[info] Loading global plugins from           /Users/szymonmatejczyk/.sbt/0.13/plugins
[info] Loading project definition from /Users/szymon/oss/twitter-cassovary/project
[info] Set current project to cassovary (in build file:/Users/szymon/oss/twitter-cassovary/)
> project cassovary-benchmarks
[info] Set current project to cassovary-benchmarks (in build file:/Users/szymon/oss/twitter-cassovary/)
> run
[info] Compiling 12 Scala sources to /Users/szymon/oss/twitter-cassovary/cassovary-core/target/scala-2.11/classes...
[info] Compiling 56 Scala sources to /Users/szymon/oss/twitter-cassovary/cassovary-core/target/scala-2.11/classes...
[info] Compiling 2 Scala sources to /Users/szymon/oss/twitter-cassovary/cassovary-  benchmarks/target/scala-2.11/classes...
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list

  Multiple main classes detected, select one to run:

 [1] com.twitter.cassovary.PerformanceBenchmark
 [2] com.twitter.cassovary.SubsetSamplingBenchmarks
 [3] com.twitter.cassovary.GraphGenerationBenchmarks
 [4] com.twitter.cassovary.utils.FastUtilsWrappingBenchmark

Enter number: