function perf_check(Wij)

% Form test problem
tic;
n = max(max(Wij(:,1:2)));
W = sparse(Wij(:,1), Wij(:,2), Wij(:,3), n, n);
tload = toc;
D = spdiags(1+sum(W,2), 0, n, n);
B = speye(n);
A = D-W;
tform = toc;

% Do the factorization
tic;
[L,U,P,Q] = lu(A);
tfactor = toc;

% Time a linear system solve
y = rand(n,1);
tic; x = Q*(U\(L\(P*y))); tsolve1 = toc;
tic; xp = (((y'*Q)/U)/L)*P; tsolve2 = toc;
tsolve = tsolve1 + tsolve2;

% Print times
fprintf('---------------\n');
fprintf('Load and form: %g\n', tform);
fprintf('Factor: %g\n', tfactor);
fprintf('Time for column solve: %g\n', tsolve1);
fprintf('Time for row solve: %g\n', tsolve2);
fprintf('Both solves times: %g\n', tsolve);
fprintf('Factor / solves: %g\n', tfactor / tsolve);
fprintf('---------------\n');

% Check cost of routines
delta = 1e-2;
i = 3;
k = 4;
new_wp_ik = rand(1);

tic; z = influence(L,U,P,Q, B); t1 = toc;
tic; mu = mean_opinion(z, y, n); t2 = toc;
tic; [abserr_1norm, relerr_mu] = sensitivity_bound(z, y, delta, n); t3 = toc;
tic; condA = laplace_cond1(A, L,U,P,Q); t4 = toc;
tic; znew = update_influence(z, L,U,P,Q, B, i,k, new_wp_ik); t5 = toc;

fprintf('influence / solves: %f\n', t1/tsolve);
fprintf('mean_opinion / solves: %f\n', t2/tsolve);
fprintf('sensitivity / solves: %f\n', t3/tsolve);
fprintf('cond / solves: %f\n', t4/tsolve);
fprintf('update / solves: %f\n', t5/tsolve);