This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: A simple test that will send a file to the required scribe server. This can help verifying that there is no data loss while testing "a one scribe server sending to another scribe server" scenario. Also lets get the required path in tests.php. For opensourcing I will add it to the script to revert those lines Test Plan: tested that this works DiffCamp Revision: 103042 Reviewed By: pkhemani CC: pkhemani, groys Revert Plan: OK git-svn-id: svn+ssh://tubbs/svnapps/fbomb/trunk/fbcode/scribe@25476 2248de34-8caa-4a3c-bc55-5e52d9d7b73a
- Loading branch information
groys
authored and
groys
committed
May 17, 2010
1 parent
8c51959
commit 186eef2
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
<?php | |||
// Copyright (c) 2007-2008 Facebook | |||
// | |||
// Licensed under the Apache License, Version 2.0 (the "License"); | |||
// you may not use this file except in compliance with the License. | |||
// You may obtain a copy of the License at | |||
// | |||
// http://www.apache.org/licenses/LICENSE-2.0 | |||
// | |||
// Unless required by applicable law or agreed to in writing, software | |||
// distributed under the License is distributed on an "AS IS" BASIS, | |||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
// | |||
// See accompanying file LICENSE or visit the Scribe site at: | |||
// http://developers.facebook.com/scribe/ | |||
|
|||
/* File cat test | |||
* Read file, $file line by line send to scribe at localhost:1463 | |||
* with a category name = $category each line becomes a message. | |||
* messages are sent at a rate of $rate messages per second | |||
*/ | |||
|
|||
require_once 'tests.php'; | |||
|
|||
function printUsage() { | |||
echo "Usage $arg[0] pathtofile [categoryname]"; | |||
} | |||
|
|||
if ($argc > 2) { | |||
$file = $argv[1]; | |||
$category = $argv[2]; | |||
} else if ($argc > 1) { | |||
$file = $argv[1]; | |||
$category = "filecattest"; | |||
} else { | |||
printUsage(); | |||
} | |||
|
|||
print 'starting test...'; | |||
$rate = 10000; | |||
$msg_per_call = 20; | |||
file_cat($file, $category, $rate, $msg_per_call); | |||
print 'done'; | |||
|
|||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters