-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e95abb
commit 835566a
Showing
17 changed files
with
46 additions
and
38 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
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
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ const email = "[email protected]"; | |
|
||
const user = { userID: name, email }; | ||
|
||
Statsig.initialize("secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW").then( | ||
Statsig.initialize(process.env.test_api_key).then( | ||
() => { | ||
const gate_name = "test_public"; | ||
|
||
|
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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,7 @@ | ||
using System.Diagnostics; | ||
using StatsigServer; | ||
|
||
// var statsig = await StatsigServer.Create("secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW"); | ||
// | ||
// var watch = Stopwatch.StartNew(); | ||
// | ||
// var result = ""; | ||
// for (var i = 0; i < 1000; i++) | ||
// { | ||
// var user = new User("user_" + i, "[email protected]"); | ||
// var exp = statsig.GetExperiment(user, "running_exp_in_unlayered_with_holdout"); | ||
// result = statsig.GetClientInitResponse(user); | ||
// } | ||
// | ||
// watch.Stop(); | ||
// | ||
// statsig.Dispose(); | ||
|
||
|
||
void Foo() | ||
{ | ||
|
@@ -33,7 +19,8 @@ void Foo() | |
async Task Bar() | ||
{ | ||
var options = new StatsigOptions(); | ||
var statsig = new Statsig("secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW", options); | ||
var sdkKey = Environment.GetEnvironmentVariable("test_api_key"); | ||
var statsig = new Statsig(sdkKey, options); | ||
await statsig.Initialize(); | ||
|
||
var user = new StatsigUser("a-user", "[email protected]"); | ||
|
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
email = "[email protected]" | ||
|
||
user = User(user_id, email) | ||
statsig = Statsig("secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW") | ||
statsig = Statsig(os.environ['test_api_key']) | ||
|
||
gate_name = "test_public" | ||
|
||
|
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
email = "[email protected]" | ||
|
||
user = User.create(name, email) | ||
statsig = Statsig.for_user(user, "secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW") | ||
statsig = Statsig.for_user(user, ENV['test_api_key']) | ||
|
||
# gate_name = "example_gate" | ||
# result = statsig.check_gate(gate_name) | ||
|
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
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
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
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
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 | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
use Statsig\StatsigFFI\Statsig; | ||
use Statsig\StatsigFFI\StatsigUser; | ||
|
||
$statsig = new Statsig("secret-9IWfdzNwExEYHEW4YfOQcFZ4xreZyFkbOXHaNbPsMwW"); | ||
$secret_key = getenv('test_api_key'); | ||
$statsig = new Statsig($secret_key); | ||
$statsig->initialize(function () use ($statsig) { | ||
$user = new StatsigUser("a-user", "[email protected]"); | ||
$gcir = $statsig->getClientInitializeResponse($user); | ||
|
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
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
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
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