diff --git a/trace_generator/demo.cc b/trace_generator/demo.cc
index 555e340..c612e3c 100644
--- a/trace_generator/demo.cc
+++ b/trace_generator/demo.cc
@@ -15,8 +15,18 @@
 #include "trace_generator.h"
 
 #include <iostream>
+#include <algorithm>
 
-int main(int, char **) {
+
+long getLongOptOrDefault(int argc, char **argv, const std::string &option, long def_value) {
+    char **end = argv + argc;
+    char **itr = std::find(argv, end, option);
+
+    return (itr != end && ++itr != end) ? std::stol(*itr) : def_value;
+}
+
+
+int main(int argc, char **argv) {
   std::vector<int> query_library(10);
   std::iota(query_library.begin(), query_library.end(), 0);
 
@@ -27,14 +37,17 @@ int main(int, char **) {
   // a queue to be executed by another thread. The start time can be ignored or
   // used by some policy mechanism to help determine on batch size.
 
+  std::chrono::microseconds time_to_sleep( getLongOptOrDefault(argc, argv, "-t", 100) );
+  std::cout << "Time to sleep ( -t ) = " << time_to_sleep.count() << " us\n";
+
   // This example enqueue function just sleeps for 100 us.
   TraceGenerator::EnqueueFn<int> enqueue =
-      [](std::chrono::nanoseconds start, int query,
+      [&time_to_sleep](std::chrono::nanoseconds start, int query,
          std::function<void(void)> completion_callback) {
         // TODO(tjablin): Right now, the demo inference just sleeps for one
         // hundred microseconds to demonstrate the API. This demo should be more
         // realistic.
-        std::this_thread::sleep_for(std::chrono::microseconds(100));
+        std::this_thread::sleep_for( time_to_sleep );
         completion_callback();
       };
 
@@ -44,7 +57,9 @@ int main(int, char **) {
   // TODO(tjablin): The latency bound of 400 us is unphysically low.
 
   // The target latency bound.
-  std::chrono::nanoseconds latency_bound(400000);
+
+  std::chrono::nanoseconds latency_bound( getLongOptOrDefault(argc, argv, "-l", 4000000) );
+  std::cout << "Latency bound ( -l ) = " << latency_bound.count() << " ns\n";
 
   // The minimum number of queries.
   uint64_t min_queries = 4096;
@@ -53,7 +68,8 @@ int main(int, char **) {
   std::chrono::seconds min_duration(2);
 
   // The minimum percent of queries meeting the latency bound.
-  double latency_bound_percentile = 0.95;
+  double latency_bound_percentile = getLongOptOrDefault(argc, argv, "-p", 95) / 100.0;
+  std::cout << "Latency bound percentile ( -p ) = " << std::roundl(100 * latency_bound_percentile) << "%\n";
 
   // The pseudo-random number generator's seed.
   uint64_t seed = 0;
